eazyjay Posted May 8, 2018 Share Posted May 8, 2018 Hey guys, i've been searching for a long time now but i still cannot find what i am looking for. What i need the script to do is allow me to set a mouse location point somewhere with button 1. After that i want to press 2 (take it from pause) so the script will start, and bring the mouse to the set location and right click it, go 50 pixels down and left click there. As last it sends a 2 to pause the script again. Button 3 activates the Attackloop and Alt + Q Exit's the script. I've come pretty far but i am really stuck at this point. When I press 1 it shows my msgbox with the mouse positions. But those positions aren't saved. When i press 3 my script wont run and gives me the following error: .au3" (27) : ==> Variable used without being declared.: MouseMove($MousePos[0], $MousePos[1], 1) MouseMove(^ ERROR >Exit code: 1 Time: 7.797 Can anybody help me please? So far i have created the following script: expandcollapse popupHotKeySet("!q", "Terminate") HotKeySet("1", "getloc") HotKeySet("2", "_Continue") HotKeySet("3", "attackLoop") Dim $binFlag = True Func Terminate() Exit 1 EndFunc Func getloc() $MousePos = MouseGetPos() $MousePos[0] ; Mouse X position $MousePos[1] ; Mouse Y position msgbox(0,"Debug","Cursor located at " & $MousePos[0] & "," & $MousePos[1]) EndFunc Func _Continue() $binFlag = Not $binFlag EndFunc Func attackLoop() While 1 sleep(1000) MouseMove($MousePos[0], $MousePos[1], 1) sleep(5000) $MousePos[1] = $MousePos[1] -50 ; Moves 50 pixels down of the original coordinate MouseMove($MousePos[0], $MousePos[1]) Sleep( 200 ) MouseClick( "Left" ) sleep (200) Send("2") sleep(1000) EndIf Sleep(50) WEnd EndFunc While 1 sleep(250) WEnd Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted May 8, 2018 Share Posted May 8, 2018 @eazyjay Welcome to the AutoIt forum Seems that you missed the Forum Rules. Take a look before posting Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
eazyjay Posted May 8, 2018 Author Share Posted May 8, 2018 So where do i go with this question ;S just need help lol Link to comment Share on other sites More sharing options...
Developers Jos Posted May 8, 2018 Developers Share Posted May 8, 2018 2 minutes ago, eazyjay said: So where do i go with this question ;S just need help lol Understood... but not in these forums.... sorry, but "we have been there, seen it and have way too many T-Shirts". Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts