Hi,
Struggling to add another button. The "address and contacts" button below the "?" button.
In your code is the 5 in the below the total number of controls/buttons?
Index := Index = 5 ? 1 : Index + 1
From that logic(which might be wrong
) I've tried the below (changing to 6) but its not working.
Code: Select all
WinTitle := "Customer Record ahk_class #32770 ahk_exe SBDDesktop.exe"
Controls := ["Edit3", "Edit15", "Edit17", "Edit27", "WindowsForms10.BUTTON.app.0.3553390_r30_ad11", "Button6"]
Index := 0
F6::
Index := Index = 6 ? 1 : Index + 1
ControlFocus, % ThisCtrl := Controls[Index], % WinTitle
if InStr(ThisCtrl, "WindowsForms")
ControlClick, % ThisCtrl, % WinTitle
return
F2::Index := 0
^Esc::ExitApp
Think its to do with the button I'm trying to click because code works with 6 for diff button eg Tel 2= Edit 18
Also not sure if below is correct (to test that button names firing correct per window spy)
Code: Select all
#ifWinactive, Customer Record ahk_class #32770 ahk_exe SBDDesktop.exe
^m::
ControlClick,Button6, Customer Record
Return
#ifWinactive
The above control click doesnt seem to work for any button?
Thanks