I have a program with a checkbox that I am trying to always have unchecked when I activate the hotkey. The checkbox ClassNN is WindowsForms10.BUTTON.app.0.3a48e15_r6_ad115 and the Window Title is Monkey Cancel for Stellar (5.1.1.0) - GG-TSYS.cfg. Below I will describe the strange behavior I'm experiencing.
Here is my code:
Code: Select all
F1::
WinWaitActive, Monkey Cancel for Stellar (5.1.1.0) - GG-TSYS.cfg
ControlGet, check1, Checked,,WindowsForms10.BUTTON.app.0.3a48e15_r6_ad115, Monkey Cancel for Stellar (5.1.1.0) - GG-TSYS.cfg
If check1 = 1
{
ControlClick, WindowsForms10.BUTTON.app.0.3a48e15_r6_ad115, Monkey Cancel for Stellar (5.1.1.0) - GG-TSYS.cfg
; Checkbox is checked
MsgBox, checked
}
Else
{
; Checkbox is not checked
MsgBox, Unchecked
}
After this initial Check/Uncheck, then pressing the hotkey (F1) will always give the MsgBox, Unchecked regardless if the box is checked or unchecked.
I read the ControlGet documentation and I'm just not sure what I am doing wrong.