zamaro

Untitled

Feb 24th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. #SingleInstance force
  2. ; #include C:\Users\Joey\Documents\AutoHotkey\Lib\Console.ahk
  3.  
  4. SetWorkingDir, %A_ScriptDir%
  5. file = %A_ScriptDir%\settings.ini
  6.  
  7. loop, 3
  8. {
  9. IniRead, prot%a_index%, %file%, settings, prot%a_index%
  10. IniRead, arm%a_index%, %file%, settings, arm%a_index%
  11. }
  12.  
  13. loop, 7
  14. IniRead, Un%a_index%, %file%, settings, Un%a_index%
  15. Return
  16.  
  17.  
  18. Gui:
  19. Gui, Add, CheckBox, vProt1 checked , Prot
  20. Gui, Add, CheckBox, varm3 checked, Arm
  21. Gui, Add, CheckBox, vUn1 Checked, Un1
  22. Gui, Add, CheckBox, vUn2 Checked, Un2
  23. Gui, Add, CheckBox, vUn3 Checked, Un3
  24. Gui, Add, CheckBox, vUn4 Checked, Un4
  25. Gui, Add, CheckBox, vUn5 Checked, Un5
  26. Gui, Add, CheckBox, vUn6 Checked, Un6
  27. Gui, Add, CheckBox, vUn7 Checked, un7
  28. Gui, Add, Button, x526 y387 w100 h30 gSave1, Save
  29. Gui, Show, , New GUI Window
  30. Return
  31.  
  32.  
  33. Save1:
  34. IniWrite, %prot1%, %file%, settings, prot1
  35. IniWrite, %prot3%, %file%, settings, prot3
  36. IniWrite, %arm3%, %file%, settings, arm3
  37. loop, 7
  38. IniWrite, % un%a_index%, %file%, settings, un%a_index%
  39. return
  40.  
  41. guiClose:
  42. esc::
  43. exitapp
  44.  
  45.  
  46.  
  47. F1::
  48. Blockinput on
  49. MouseGetPos, XX, YY
  50. gosub checkboxes
  51. gosub MouseArea
  52. Blockinput off
  53. return
  54.  
  55. checkboxes:
  56. ;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.
  57.  
  58. Loop:
  59.  
  60. if box1 checked:
  61. mouseclick x,y,,2
  62.  
  63. if box2 checked:
  64.  
  65. mouxclick x+40, y,,2
  66.  
  67. if box3 checked:
  68.  
  69. mouseclick x+80, y,,2
  70.  
  71. if box4 checked
  72.  
  73. mouse click x120, y,,2
  74.  
  75. if box5 checked
  76.  
  77. mouseclick x, y+40,,2
  78.  
  79. if box6 checked
  80.  
  81. mouse click x+40,y+40,, 2
  82.  
  83. and so on till 28.
  84.  
  85. 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?
  86.  
  87.  
  88. if notworking {
  89. try to make it work
  90. } else {
  91. drownself
  92. }
Advertisement
Add Comment
Please, Sign In to add comment