spider0804 Posted May 27, 2009 Posted May 27, 2009 #include <misc.au3> ; Local $Mousecords[2], $Started = 1 $end = 0 While $end = 0 WinWaitActive("Star Wars") If _IsPressed(70) Then $Mousecords = MouseGetPos() Beep(800, 100) While _IsPressed(70) ; WEnd EndIf If _IsPressed(71) Then If $Started = 0 Then $Started = 1 Beep(800, 100) Else $Started = 0 Beep(400, 100) EndIf While _IsPressed(71) ; WEnd EndIf If $Started = 1 Then $I = 1 Do MouseMove(1124,524) MouseDown("Left") Sleep(600) Send("5432") MouseUp("Left") MouseDown("Left") Sleep(400) Send("5342") MouseUp("Left") $I += 1 Sleep(200) Until $I = 4 Sleep(54325000) EndIf WEnd how would i bind f1 to start this script and f2 to stop it?
Valuater Posted May 27, 2009 Posted May 27, 2009 see the demo at the bottom of the page for HotKeySet 8)
spider0804 Posted May 27, 2009 Author Posted May 27, 2009 im not asking for a demo im asking for help with input
JackDinn Posted May 28, 2009 Posted May 28, 2009 it's easier for us to read if you put the script in script tags & do script tidy before posting. so are you wanting to run your compiled_script.exe when you hit a hot key you need to compile it, make a shortcut to the .exe then in the properties of the shortcut you can set normal windows hotkeys. then if you want it to exit on a hotkey you need to set up the exit func and hot key. just look up HotKeySet() in the help file. Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D
spider0804 Posted May 29, 2009 Author Posted May 29, 2009 i want it to put the moust position at the coords at f1, start with f2 and end with f3
spider0804 Posted May 29, 2009 Author Posted May 29, 2009 #include <misc.au3> ; Local $Mousecords[2], $Started = 1 $end = 0 While $end = 0 WinWaitActive("Star Wars") If _IsPressed(70) Then $Mousecords = MouseGetPos() Beep(800, 100) While _IsPressed(70) ; WEnd EndIf If _IsPressed(71) Then If $Started = 0 Then $Started = 1 Beep(800, 100) Else $Started = 0 Beep(400, 100) EndIf While _IsPressed(71) ; WEnd EndIf If $Started = 1 Then $I = 1 Do MouseMove(1124,524) MouseDown("Left") Sleep(600) Send("5432") MouseUp("Left") MouseDown("Left") Sleep(400) Send("5342") MouseUp("Left") $I += 1 Sleep(200) Until $I = 4 Sleep(54325000) EndIf WEnd how would i bind f1 to start this script and f2 to stop it?
Developers Jos Posted May 29, 2009 Developers Posted May 29, 2009 i want it to put the moust position at the coords at f1, start with f2 and end with f3yes...and ?What have you done with the supplied help other than ignoring it? 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.
spider0804 Posted May 29, 2009 Author Posted May 29, 2009 yes...and ?What have you done with the supplied help other than ignoring it?well i read the tutorial but its greek to mei dont know what any of that means i just took a script someone wrote for me and changed it so it works how i want it to and the only way i figured that out was i knew it was just pressing numbers and i set the mouse positionbut as for code i dont know bubkis
Developers Jos Posted May 29, 2009 Developers Posted May 29, 2009 well i read the tutorial but its greek to mei dont know what any of that means i just took a script someone wrote for me and changed it so it works how i want it to and the only way i figured that out was i knew it was just pressing numbers and i set the mouse positionbut as for code i dont know bubkisThen start learning and come back when you understand more or ask the person that wrote it for you.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.
JackDinn Posted May 29, 2009 Posted May 29, 2009 (edited) i want it to put the moust position at the coords at f1, start with f2 and end with f3 im sorry mate, this just is not a specific enough question. i would help you out but i would need precise information on what you need to do. why dont you start with the first objective, explain it & i'll build it for you (im board atm, your lucky day maybe ) then if we can get the first part agreed on as working we can move on to the next etc.. so maybe your first part might be something like :- i want the mouse to move to x,y when the window "window name" is active But try this first its my best guess from what you have given so far, put mouse where you want to check F1 to start F2 to stop & ESC key to exit script. expandcollapse popup#include <misc.au3> HotKeySet("{F1}", "start") HotKeySet("{F2}", "stop") HotKeySet("{ESC}", "escape") main() Func main() While 1 Sleep(50) WEnd EndFunc;==>main Func start() $Mousecords = MouseGetPos() Beep(800, 100) While WinActive("Star Wars") $I = 1 Do MouseMove(1124, 524) MouseDown("Left") Sleep(600) Send("5432") MouseUp("Left") MouseDown("Left") Sleep(400) Send("5342") MouseUp("Left") $I += 1 Sleep(200) Until $I = 4 WEnd EndFunc;==>start Func stop() Beep(400, 100) main() EndFunc;==>stop Func escape() Exit EndFunc;==>escape i didn't understand why you was getting the mouse cords but i left it in anyhow. Edited May 29, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D
spider0804 Posted May 30, 2009 Author Posted May 30, 2009 (edited) Thankyou CODE#include <misc.au3> HotKeySet("{F1}", "start") HotKeySet("{F2}", "stop") HotKeySet("{F3}", "escape") Hotkeyset("{F4}", "move") main() Func main() While 1 Sleep(50) WEnd EndFunc;==>main Func start() While WinActive("Star Wars") $I = 1 Do MouseMove(1124, 524) MouseDown("Left") Sleep(600) Send("5432") MouseUp("Left") MouseDown("Left") Sleep(600) Send("5342") MouseUp("Left") $I += 1 Sleep(600) Until $I = 4 Sleep(10000) WEnd EndFunc;==>start Func stop() main() EndFunc;==>stop Func escape() Exit EndFunc;==>escape Func move() MouseMove(1124, 524) EndFunc ;==>move thats what i have now, now is there a way to make autoit ovveride the game commands, the game reconizes f1 f2 f3 f4 unless its windowed mode but can i make it bypass the game and still do the commands in non windowed mode Edited May 30, 2009 by spider0804
JackDinn Posted May 30, 2009 Posted May 30, 2009 just use different hot key's ? Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now