Page 1 of 1

Autoload Feature (Programmable Macros???)

Posted: Fri May 23, 2003 2:45 pm
by doc6502
Hi

I posted this as a "Can you do this?" question, and I was told I couldn't, so I'm submitting it as an Enhancement Request.

Here's the situation:

I use TextPad as an offline editor for (primairly AS/400) source. I've written a short Perl script that allows me to download source from the 400 via FTP. What I would like to do is:

1. Start the script via a macro, and pass parameters to the script, specifying the location of the source file to download.
2. Download the source via FTP.
3. Automatically load the downloaded file into TextPad, once the FTP transfer is complete.

I can manage Steps 1 and 2, but I'm told that Step 3 cannot be done with TextPad as it is today.

So what I'd like to see is some sort of Autoload feature that could be invoked via Macro.

Ideally, this would require that TextPad would need to have some interaction from the user when the Macro starts-- it would have to gather parms from the user, and then there would have to be some sort of load(<filename>) function when the macro finishes executing the Perl script.

So, the steps outlined above would have to be:

Setup:

1. Programmer writes a macro that allows parameters. For this example, they could be $getFileName, $loadSourceName. The macro invokes a Perl script.

Execution:

1. Programmer executes the Macro
2. TextPad asks for values for the parms $getFileName and $loadSourceName.
3. TextPad fires up the Perl script, passing $getFileName to Perl.
4. Perl does its magic with $getFileName value, generates and FTP Script, and executes the script.
5. Control returns to TextPad. TextPad loads the file specified in $getFileName.

Or something like that...

Thanks!

-Doc

Thanks!

-Doc

Posted: Fri May 23, 2003 9:37 pm
by Bob Hansen
Take a look at Macro Scheduler.

Macro Scheduler is available at http://www.mjtnet.com/index.htm?ref=rmh ... rg_2644641. This should handle all of your macro needs.