Posts: 5
Threads: 2
Joined: Jan 2008
Hi,
I created an executable that should monitor a file event eg(added, modified). Under Quick Macros it works fine and continuosly but as an executable it captures the first event and then it terminates.
How can I keep the executable constantly active?
Thanks
Posts: 12,095
Threads: 142
Joined: Dec 2002
For example
wait -1
(in main thread). Because exe ends when main thread ends.
Posts: 5
Threads: 2
Joined: Jan 2008
Gintaras,
Thanks for the prompt reply!
This is the example code:
function event $name [$newname]
event: 1 added, 2 removed, 4 renamed, 8 modified
sel event
case 1
mes- "Run and Synchronize eFilmLite?" "" "OC?" ;;message box; on Cancel end macro
run "C:\RSNA2009FinalWithPortables\eFilmLt.exe"
case 8
mes- "Synchronize eFilmLite?" "" "OC?" ;;message box; on Cancel end macro
run "C:\RSNA2009FinalWithPortables\eFilmLt.exe"
wait -1
Would this perform the desired effect of executing the program every time the file is modified?
Thanks
Posts: 12,095
Threads: 142
Joined: Dec 2002
QM triggers don't work in exe.
Posts: 5
Threads: 2
Joined: Jan 2008
Do I have to install QM on target machine for the trigger to work?
Thanks
Posts: 12,095
Threads: 142
Joined: Dec 2002
Yes. Because QM manages triggers. In exe there is no trigger code.