How to include .exe file in other .exe file

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Topline2012
Newbie
Posts: 8
Joined: Mon Feb 13, 2012 7:55 pm

How to include .exe file in other .exe file

Post by Topline2012 » Thu Dec 12, 2013 5:23 pm

I would like to know how to How to include .exe file in other .exe file.

eg:

1. script a .exe
2.script b .exe

Script a .exe should include script b.exe and also script a.exe should pass value to script b.exe


at present I used macro>script b.scp/abc=%123% in script a.scp


thanks

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

Post by Marcus Tettmar » Thu Dec 12, 2013 7:44 pm

You can't have a compiled macro in another but you can use the Include command and have the source script included at compile time.
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
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Thu Dec 12, 2013 11:30 pm

You can if you base64 encode it. But you have to extract that script first to the temp dir or something to then be able to pass a parameter to it.

Code: Select all

Input>filename,Browse to Select a file for Base64 encoding
ExtractFileName>%filename%,strFileName
ReadFile>filename,filedata
Base64>filedata,Encode,b64data
PutClipBoard>Let>SomeVariable=%b64data%%CRLF%Base64>SomeVariable,Decode,BinaryData%CRLF%Let>WLN_NOCRLF=1%CRLF%WriteLn>%TEMP_DIR%%strFileName%,wres,BinaryData
FIREFIGHTER

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 Dec 13, 2013 9:08 am

But if you just want to include code from one script in another, and compile the lot to a .exe, just use Include.

Certainly you could suck a .exe into your script and export at runtime, but if that .exe is one of yours and you have access to the code I can't think why on earth you'd go to that much trouble when you can just include the code in the first place.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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