LNGS Posted February 24, 2018 Posted February 24, 2018 I'm doing something wrong here.. #include <Misc.au3> #include <AutoItConstants.au3> HotKeySet("F5", "StartStop") HotKeySet("F7", "TWIN") HotKeySet("F8", "CTWIN") While 1 Sleep(100) WEnd Func StartStop() MouseClick ( "left" [, 937, 700 [, clicks = 1 [, speed = 10]]] ) EndFunc Func TWIN() MouseClick ( "right" [, 265, 128 [, clicks = 1 [, speed = 10]]] ) Sleep (500) MouseClick ( "left" [, 324, 144 [, clicks = 1 [, speed = 10]]] ) EndFunc #include <Misc.au3> #include <AutoItConstants.au3> HotKeySet("F5", "StartStop") HotKeySet("F7", "TWIN") HotKeySet("F8", "CTWIN") While 1 Sleep(100) WEnd Func StartStop() MouseClick ( "left" [, 937, 700 [, clicks = 1 [, speed = 10]]] ) EndFunc Func TWIN() MouseClick ( "right" [, 265, 128 [, clicks = 1 [, speed = 10]]] ) Sleep (500) MouseClick ( "left" [, 324, 144 [, clicks = 1 [, speed = 10]]] ) EndFunc Func CTWIN() MouseClick ( "right" [, 265, 168 [, clicks = 1 [, speed = 10]]] ) Sleep (500) MouseClick ( "left" [, 318, 181 [, clicks = 1 [, speed = 10]]] ) EndFunc
Developers Jos Posted February 24, 2018 Developers Posted February 24, 2018 You get syntax errors ..... right? Get rid of all [ and ] as they represent an optional parameter in the help file but should not be there as the examples show. 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.
LNGS Posted February 24, 2018 Author Posted February 24, 2018 3 minutes ago, Jos said: You get syntax errors ..... right? Get rid of all [ and ] as they represent an optional parameter in the help file but should not be there as the examples show. Jos I get no syntax errors when I build. I will try that tho.
Developers Jos Posted February 24, 2018 Developers Posted February 24, 2018 Just now, LNGS said: I get no syntax errors when I build. but you do when you run it! 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.
LNGS Posted February 24, 2018 Author Posted February 24, 2018 1 minute ago, Jos said: but you do when you run it! Jos I removed [ and ], still nothing is happening when I run it :/
Developers Jos Posted February 24, 2018 Developers Posted February 24, 2018 (edited) Open it in SciTE and press F5 (run) .... what happens? Edited February 24, 2018 by 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.
LNGS Posted February 24, 2018 Author Posted February 24, 2018 2 minutes ago, Jos said: Open it in SciTE and press F5 (run) .... what happens? "C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\Cecilia\Desktop\autoit.au3"
Developers Jos Posted February 24, 2018 Developers Posted February 24, 2018 (edited) .... yes ...and? (As long as it doesn't terminate only this line is shown). What do you expect to happen .... and when? By the way: Did you also remove the "clicks=" and "speed="? Edited February 24, 2018 by 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.
LNGS Posted February 24, 2018 Author Posted February 24, 2018 2 minutes ago, Jos said: .... yes ...and? (As long as it doesn't terminate only this line is shown. What do you expect to happen .... and when? By the way: Did you also remove the "clicks=" and "speed="? I removed clicks and speed. When I press F5 I want the mouse to click on a button. Same with the other functions, but nothing is happening when I press the hotkeys I set for my functions.
Developers Jos Posted February 24, 2018 Developers Posted February 24, 2018 What is the answer to?: 4 minutes ago, Jos said: What do you expect to happen .... and when? also: Simply add a MSGBOX() in the func's you activate with F5/F7/F8 so you can ensure yourself they are fired. Which application are you trying to click or are you still messing with that game and expecting it to work? 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.
LNGS Posted February 24, 2018 Author Posted February 24, 2018 (edited) 5 minutes ago, Jos said: What is the answer to?: also: Simply add a MSGBOX() in the func's you activate with F5/F7/F8 so you can ensure yourself they are fired. Which application are you trying to click or are you still messing with that game and expecting it to work? Jos Streamlabs, their macro options are not working properly so I have to make a bot that clicks all the gui buttons instead. I did answer that, but I can do it again. I expect my script to click a button when i press f5, f7, f8. Edited February 24, 2018 by LNGS
Developers Jos Posted February 24, 2018 Developers Posted February 24, 2018 Try: HotKeySet("{F5}", "StartStop") HotKeySet("{F7}", "TWIN") HotKeySet("{F8}", "CTWIN") 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.
LNGS Posted February 24, 2018 Author Posted February 24, 2018 (edited) No difference :/ Edited February 24, 2018 by LNGS
LNGS Posted February 25, 2018 Author Posted February 25, 2018 Turns out the script works on another computer. Trusting the app in my antivirus and even turning it off completely was not enough. I had to uninstall my antivirus for it to work. Thanks for helping out.
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