mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2008
Posts: 8
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Apr 2008
Posts: 8
From a script, an .exe program is called and parameters passed.
The program is ip2country. In this program their are button that can be trigger manually with alt-c or alt-w. How from the script can these button can be trigger?
Tnaks to all

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
After activating the window you can use SendKeys:

alias sendkeys { .comopen a WScript.Shell | .comclose a $com(a,SendKeys,3,*bstr,$$1-) }

//sendkeys $(%c,0)

Activating the window can also be done with com:

alias appactivate { .comopen a WScript.Shell | .comclose a $com(a,AppActivate,3,*bstr,$$1-) }

//appactivate TITLEOFTHEWINDOW

at which point you can use the sendkeys code above.

You can also refactor those two aliases to work as one, saving one (probably costly) /comopen and /comclose command

Note that you cannot use these methods to get any data out of your exe. If the EXE writes the result to stdout without a GUI you can use exec.dll to get the data in a much simpler fashion.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard