Posts: 1,769
Threads: 410
Joined: Feb 2003
I have two triggers for the number 6 position on monitor one. the first bump act's Chrome; when there's two bumps, it act's Chrome and moves it to monitor 2.
QM doesn't seem to like both of those macros with those triggers enabled at the same time. Should QM be able to have a single and double assignment on the same window position? if not, how can I build in a 'wait' for the second bumb?
Posts: 12,140
Threads: 142
Joined: Dec 2002
Macro
single and double
int+ g_18243
_i=GetTickCount
int isDouble=GetTickCount-g_18243<500; g_18243=GetTickCount
if isDouble
,out "double"
else
,out "single"
Macro
single or double
int+ g_18244
if(g_18244) g_18244=0; ret
int isDouble=1
g_18244=1; wait 0.5 -V g_18244; err isDouble=0; g_18244=0
if isDouble
,out "double"
else
,out "single"
;if this is a macro, check "Run simultaneously" in Properties
Quote:Should QM be able to have a single and double assignment on the same window position?
No.
Posts: 1,769
Threads: 410
Joined: Feb 2003
Awesome, just combined them.
Macro
Act Chrome
Trigger
#6m1 0x4
int+ g_18243
_i=GetTickCount
int isDouble=GetTickCount-g_18243<500; g_18243=GetTickCount
ifi- win(" - Google Chrome" "Chrome_WidgetWin_1" "chrome")
,run "$program files$\Google\Chrome\Application\chrome.exe" "" "" "*" ;;Google Chrome
if isDouble
,out "double"
,act win(" - Google Chrome" "Chrome_WidgetWin_1" "chrome")
,MoveWindowToMonitor win() 2 2
else
,act win(" - Google Chrome" "Chrome_WidgetWin_1" "chrome")
Posts: 1,769
Threads: 410
Joined: Feb 2003
I'm doing this again but it seems to fire the "single" branch and then starts again to execute the "double" branch.
Is it possible that the version 2.4.11.0 won't run this code correctly? It is quite old when I started this thread.
Macro
retry
Trigger
#1m
int+ g_18243
_i=GetTickCount
int isDouble=GetTickCount-g_18243<500; g_18243=GetTickCount
if isDouble
,;out "double"
,act win(" - Visual Studio Code" "Chrome_WidgetWin_1" "Code")
else
,;out "single"
,act win("EditPad Pro 7" "TFormEditPadPro7" "EditPadPro7")
Posts: 12,140
Threads: 142
Joined: Dec 2002
I guess the macro should be like the "single or double" example, not like "single and double" example.
Posts: 1,769
Threads: 410
Joined: Feb 2003
Yep. that way works.
thanks.