Can WebRecorder Scripts run as a Compiled exe?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Can WebRecorder Scripts run as a Compiled exe?

Post by jpuziano » Fri Nov 23, 2007 8:46 pm

Hi Marcus,

After seeing this post... run WebRecorder macro from Perl...
mtettmar wrote:WebRecorder macros are Macro Scheduler files. WebRecorder generates the code and the script files are played back in Macro Scheduler.

Macros can be run from the command line using:

msched.exe macro_name/script_file

And you can pass parameters on the command line:

msched.exe script_file /parm1=value1 /parm2=value2 /etc=...

Even easier would be if you compile the script to an executable. Then you just need to run the exe:

macroexe.exe /parm1=value1 /parm2=value2

So you can simply run this in Perl with the system command:

system('macro.exe /parm1=value1 /parm2=value2');

See Command Line Options in the Macro Scheduler help file.
...I had hoped to be able to compile a script made with WebRecorder and just run the exe but so far I haven't been able to do this.

I've installed the WebRecorder trial version and your WebRecorder script from this post runs fine when run from within Macro Scheduler.

I can compile it into an exe but the exe fails when run with the same error it gave when I ran the code from within Macro Scheduler prior to installing WebRecorder.

Am I missing something or is this not possible? If not, is this planned for the future... similar to how the Image Recognition Library commands are now compilable?

Anyone else out there able to do this or looking for this ability?
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Nov 23, 2007 10:33 pm

You need to distribute the IEAuto.DLL file with your EXE (Assuming your license permits it).

You have two options:

1. In WebRecorder 2.0 go to Tools/Output Format and select "Old style LibFunc calls". Then record your macro. Now you simply need IEAuto.DLL in the same folder as your EXE (or in the path or modify the LibLoad line to point to wherever IEAuto.DLL is).

2. If you use the default "Import style functions" then in the folder of the compiled EXE you need an Imports folder and in there you need to copy IEAuto.DLL and IEAuto.INI from your Macro Scheduler Imports folder.

If you have WebRecorder 1.x then only option 1 above applies (1.x did not have the Import style option and used straight LibFunc calls).
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Fri Nov 23, 2007 11:01 pm

Hi Marcus,

Thanks for the speedy reply, I tried method 2 and it worked flawlessly.

I can also see use for method 1 as its 1 less file and one less directory required on the target machine.

Very nice... take care.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Fri Nov 23, 2007 11:26 pm

Hi Marcus,

One small thing...
mtettmar wrote:2. If you use the default "Import style functions" then in the folder of the compiled EXE you need an Imports folder and in there you need to copy IEAuto.DLL and IEAuto.INI from your Macro Scheduler Imports folder.
Under C:\Program Files\MJT Net Ltd\Macro Scheduler I have the following subdirectories:

imports
Samples
Uninstall

So the name of the folder I have is imports not Imports. Happily, the compiled WebRecorder script runs just fine whether I call the new directory I just made imports or Imports.

I guess the installer created those three directories in the Macro Scheduler directory... and those directory names probably go back a long time. Any reason why imports wasn't capped like the rest?

If not, can I rename imports to Imports in the Macro Scheduler directory so they all start with caps or... would that have possible negative effects?

Thanks again for the WebRecorder help.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts