Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance force
- ; #include C:\Users\Joey\Documents\AutoHotkey\Lib\Console.ahk
- SetWorkingDir, %A_ScriptDir%
- file = %A_ScriptDir%\settings.ini
- loop, 3
- {
- IniRead, prot%a_index%, %file%, settings, prot%a_index%
- IniRead, arm%a_index%, %file%, settings, arm%a_index%
- }
- loop, 7
- IniRead, Un%a_index%, %file%, settings, Un%a_index%
- Return
- Gui:
- Gui, Add, CheckBox, vProt1 checked , Prot
- Gui, Add, CheckBox, varm3 checked, Arm
- Gui, Add, CheckBox, vUn1 Checked, Un1
- Gui, Add, CheckBox, vUn2 Checked, Un2
- Gui, Add, CheckBox, vUn3 Checked, Un3
- Gui, Add, CheckBox, vUn4 Checked, Un4
- Gui, Add, CheckBox, vUn5 Checked, Un5
- Gui, Add, CheckBox, vUn6 Checked, Un6
- Gui, Add, CheckBox, vUn7 Checked, un7
- Gui, Add, Button, x526 y387 w100 h30 gSave1, Save
- Gui, Show, , New GUI Window
- Return
- Save1:
- IniWrite, %prot1%, %file%, settings, prot1
- IniWrite, %prot3%, %file%, settings, prot3
- IniWrite, %arm3%, %file%, settings, arm3
- loop, 7
- IniWrite, % un%a_index%, %file%, settings, un%a_index%
- return
- guiClose:
- esc::
- exitapp
- F1::
- Blockinput on
- MouseGetPos, XX, YY
- gosub checkboxes
- gosub MouseArea
- Blockinput off
- return
- checkboxes:
- ;here i need a loop to go over 28 boxes, each box i will add a specific mouse cord for it to click, like if 5 are checked it will do them (they dont have to be in order) and ignore the ones aren't checked.
- Loop:
- if box1 checked:
- mouseclick x,y,,2
- if box2 checked:
- mouxclick x+40, y,,2
- if box3 checked:
- mouseclick x+80, y,,2
- if box4 checked
- mouse click x120, y,,2
- if box5 checked
- mouseclick x, y+40,,2
- if box6 checked
- mouse click x+40,y+40,, 2
- and so on till 28.
- lets see i want box 5,6,13,18 checked not in a row and i wanna only click those How do i make a loop cycle through all of that?
- if notworking {
- try to make it work
- } else {
- drownself
- }
Advertisement
Add Comment
Please, Sign In to add comment