Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check if qm is running, icon = red (Function .exe)
#1
How can I check in a function that is converted to .exe if QM is actually running/processing code.
With 'running/processing code' I mean QM icon = red.

I need to process a huge amount of websites and I want to do that on a second machine.
I start the code in QM and then I run the function executable.
The executable runs in the background and checks the QM icon in the systray (or some thread/process) if QM is processing (Icon red).
The code in QM has timeouts so it always errors on wait's that are to long. Also other processes on the machine could suddenly stop QM (chances of that are real small, but nevertheless)

I looked in the trigger properties under QM, but there wasn't any for checking if QM is processing code.
It doesn't have to be the QM icon's color, it can also be a certain thread/process id (?)

This approach may be a bit strange, but I can't think of another way to do this.
(I tried triggering code when the QM systray icon is not blue, but for some reason the code does not work. While other 'wait for color actions' do work)
#2
Can use a mutex, for example 'lock'.

Macro Macro2435
Code:
Copy      Help
lock macro2435 "macro2435_mutex"
mes "Macro2435 is running"
Function Function_exe
Code:
Copy      Help
;/exe
rep
,1
,lock macro2435 "macro2435_mutex" 0
,err out "Macro2435 is running"; continue
,lock- macro2435
,out "Macro2435 is NOT running"
#3
Thank you!


Forum Jump:


Users browsing this thread: 1 Guest(s)