Snurkel Posted September 2, 2008 Posted September 2, 2008 Okay, So i'm just trying to accomplish a very simple task.. I wan't to be able to press 1 key, and have it automate 3 keystrokes for me.. So why I'm having such issues, I don't know. My codes not giving me errors.. It's just not running.. so here we go HotKeySet("{F1}", "sorry") WinWaitActive("Enemy Territory") Func sorry() Send("v") Send("4") Send("5") EndFunc No results... Nothing happens, I'm such a tard. Any help is appreciated.
Zedna Posted September 2, 2008 Posted September 2, 2008 You must add loop to make your script wait (never end) also add some hotkey to exit ... HotKeySet("{F1}", "sorry") WinWaitActive("Enemy Territory") While 1 Sleep(100) WEnd Func sorry() Send("v") Send("4") Send("5") EndFunc Resources UDF ResourcesEx UDF AutoIt Forum Search
evilertoaster Posted September 2, 2008 Posted September 2, 2008 Try making sure the code block doesn't run...maybe add a messagebox or somthing for testing. Also make sure F1 isn't already hotkeyed by another script or application. Lastly, you'll want to check if whatever application you're trying to make a macro for (I'm guessing a game) doesn't explicitly block autoit scripting features from being used.
Snurkel Posted September 2, 2008 Author Posted September 2, 2008 You must add loop to make your script wait (never end) also add some hotkey to exit ... HotKeySet("{F1}", "sorry") WinWaitActive("Enemy Territory") While 1 Sleep(100) WEnd Func sorry() Send("v") Send("4") Send("5") EndFunc Makes sense.. I didnt think about it that way. Thank you for the tip.
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