03-07-2017, 03:25 PM
Gint + QM Forum,
I've been trying to get better working inside of web browsers with Acc and the click flash example to expand my knowledge of QM which is still pretty minimal. Shown above is a part from a much larger macro that checks for a variety of named check boxes that occasionally appear and disappear depending on a few scenarios. Over the past few days I have noticed it will error out, but I never see the process fully. The error always links to the line, "a.Location (x y w h)". At first glace I assumed that maybe the window was disappearing, but wouldn't that affect a.Find instead of a.Location?
Macro Macro1
I've been trying to get better working inside of web browsers with Acc and the click flash example to expand my knowledge of QM which is still pretty minimal. Shown above is a part from a much larger macro that checks for a variety of named check boxes that occasionally appear and disappear depending on a few scenarios. Over the past few days I have noticed it will error out, but I never see the process fully. The error always links to the line, "a.Location (x y w h)". At first glace I assumed that maybe the window was disappearing, but wouldn't that affect a.Find instead of a.Location?
Macro Macro1
;CheckBoxAction
if (aa = 0)
,callName = "Default Checkbox"
if (aa = 1)
,callName = "Primary Checkbox"
if (aa = 2)
,callName = "Success Checkbox"
if (aa = 3)
,callName = "Info Checkbox"
if (aa = 4)
,callName = "Warning Checkbox"
if (aa = 5)
,callName = "Danger Checkbox"
a.Find(w1 "STATICTEXT" callName "" 0x3031)
err
,wait 0.001; goto Top
a.Location(x y w h)
b=child(a)
ScreenToClient b +&x
x+w/2; y+h/2 ;;center
xy=(x&0xffff)|(y<<16)
SendMessage(b WM_LBUTTONDOWN 1 xy)
SendMessage(b WM_LBUTTONUP 0 xy)