Home > Uncategorized > Drag and Drop with Regina Rexx…

Drag and Drop with Regina Rexx…

Since I’m a mainframe guy I’ve spent most of my career writing REXX whenever I needed a quick script which means that I know REXX pretty well. Lately I’ve been playing with REXX on Windows thanks to an implementation of REXX called  Regina Rexx, see here.

Of course, one of the things you can do on Windows is drag and drop so I wanted to be able to drop a file onto a Regina REXX program and have the REXX program then process the file.

Typically you access input parms in a REXX exec by using the “parse arg varname” statement but I found that this did not work when dropping a file onto a Rexx exec on my Windows machine.

After some research I found that I needed to create a shortcut to the Regina REXX.EXE program with a parameter that is the path and name to the REXX program to run. You then have to drop your files onto the SHORTCUT.

 

So let’s say I have the following exec called “test.rexx” on my desktop:

parse arg parms
say parms
say "Press enter to end" 
parse pull .

I then create a shortcut on my desktop that looks like this:

"C:\Program Files\rexx.org\Regina\rexx.exe" "C:\Users\ltlfrari\Desktop\test.rexx"

So if I drop a file called “test.txt” onto the shortcut, this is the output that I see:

RexxDropTestOutput

Basically the exec receives the full path and file name as an input argument.

 

 

 

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: