INSIGHT SOFTWARE SOLUTIONS
OTHER AUTOMATION TOOLS
ABOUT US  

 

 

Knowledge Base

I have seen that I can play back a macro by a command line switch. Is it possible to start a macro from another program without having to start the macro player by a command line switch? I.e. can I use DDE or something similar, sending a windows message to the program when it is hiding in the taskbar?

I have seen that I can play back a macro by a command line switch. Is it possible to start a macro from another program without having to start the macro player by a command line switch? I.e. can I use DDE or something similar, sending a windows message to the program when it is hiding in the taskbar?

The Macro Express Player (MACEXP.EXE) can be running already (i.e. it is in the taskbar) when you issue the command line parameter and it will run the macro. However, since the Macro Express Player is a good size, this can cause a noticeable delay. We have created a small executable to overcome this. The file is MEPROC.EXE. You can use either the /A or /MXE command syntax that is available with MACEXP.EXE. If the Macro Express Player is not running and you use MEPROC.EXE, it will first launch it and then run the macro; otherwise, it just sends some windows messages directly to the player.

If you want to try and simulate what MEPROC.EXE does, I can give you the basics:

Do a FindWindow on "Macro Express Player" to get the window handle.
For this example, the Window Handle is W.
N is the command and will be as follows:
N := wm_user+20 (for nickname)
N := wm_user+21 (for playable macro name)
S = the nickname or the playable macro name

CODE:
for K := 1 to length(S) do
PostMessage(W, N, ord(S[K]), 0);
PostMessage(W, N, 0, 0);

- Applies to: Macro Express 3 and Macro Express Pro
- Updated: December 31, 2014

Search Knowledge Base-Question Not Answered?
Press Kit | Resellers | Affiliates | Contact Us | Site Map | Trademarks | Privacy
Copyright © 2020 Insight Software Solutions, Inc. All rights reserved.
Insight Software Solutions, Inc. Home Page Insight Software Solutions, Inc. Home Page