Hi!
Strange behavior detected...
This one works:
But this one doesn't:
But both macros are actually the same... How is that possible?
Actually, if Notepad is already running, the second macro detects it, and activates the window (act w). But the "else" condition is never met...
And another question, is there more elegant way to wait for the window to appear than this rep()... - construction?
Thank you for your help!
Strange behavior detected...
This one works:
if win("Notepad" "Notepad")
,act win("Notepad" "Notepad")
else
,run "$system$\notepad.exe" "" "" "" 0x200
,rep()
,,0.01
,,if win("Notepad" "Notepad")
,,,mov+ 0.5 0 0.5 1.0 win("Notepad" "Notepad") 4
,,,break
But this one doesn't:
int w = win("Notepad" "Notepad")
if w
,act w
else
,run "$system$\notepad.exe" "" "" "" 0x200
,rep()
,,0.01
,,if w
,,,mov+ 0.5 0 0.5 1.0 w 4
,,,break
But both macros are actually the same... How is that possible?
Actually, if Notepad is already running, the second macro detects it, and activates the window (act w). But the "else" condition is never met...
And another question, is there more elegant way to wait for the window to appear than this rep()... - construction?
Thank you for your help!