Thanks for the explanation. I'm still a little confused.
You can, but you can't easily get information BACK from an .exe. Not transparently anyway.
I admit Macro Scheduler is 90% of my programming experience and I have little formal training in computers. I would expect that most programming languages allow an exit code. Macro scheduler does. If I compile the first script below and run it from the second script below, I get the results of the compiled (executable) script ported transparently to my second script. And yes I could easily write the first script in such a way that it could perform multiple functions based on the parameters supplied to it... just like a dll.
I get it from the standpoint of using Microsoft supplied dlls. Many programs can use the functions that always exist because they came with the OS. but I still don't understand the advantage of using custom dlls over using custom exes. Perhaps its that programming for a dll to function in this manner is easier? Or they compile smaller? Or the dll model is the way its done to avoid confusion?
Compile this and name it C:\mult.exe
Code: Select all
Let>result=%Param1%*%param2%
Exit>result
This script runs and uses the results from C:\mult.exe
Code: Select all
Dialog>Dialog1
Caption=Multiply
Width=400
Height=125
Top=10
Left=CENTER
Button=Multiply,135,62,75,25,3
Edit=msEdit1,37,25,121,
Edit=msEdit2,183,25,121,
Label=X,168,27,true
Label==,312,27,true
Label=Product,328,27,true
EndDialog>Dialog1
Show>Dialog1
Label>Loop
GetDialogAction>dialog1,res1
If>res1=2
Exit>0
EndIf
If>res1=3
GoSub>Process
EndIf
Wait>0.01
Goto>Loop
SRT>Process
Let>rp_wait=1
RunProgram>c:\mult.exe /param1=%dialog1.msedit1% /param2=%dialog1.msedit2%
Let>dialog1.mslabel3=rp_result
ResetDialogAction>dialog1
END>Process