AzKay Posted June 1, 2006 Share Posted June 1, 2006 WinActivate("Gunz Launcher") HotKeySet("!{ESC}", "ExitGunz") HotKeySet("{F2}", "ForwardDash") HotKeySet("{1}", "LeftDash") HotKeySet("{3}", "RightDash") HotKeySet("{2}", "BackDash") Func ExitGunz () Opt("SendKeyDownDelay", 10) Send("!{F4}") EndFunc Func ForwardDash () Opt("SendKeyDownDelay", 10) Send("{W 2}") EndFunc Func LeftDash () Opt("SendKeyDownDelay", 10) Send("{A 2}") EndFunc Func RightDash () Opt("SendKeyDownDelay", 10) Send("{D 2}") EndFunc Func BackDash () Opt("SendKeyDownDelay", 10) Send("{S 2}") EndFunc Ok, Ive got this, everytime I run it, it Ends, but I dont want it to end unless I end it. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Valuater Posted June 1, 2006 Share Posted June 1, 2006 needs a loop While 1 Sleep(20) Wend 8) Link to comment Share on other sites More sharing options...
BigDod Posted June 1, 2006 Share Posted June 1, 2006 (edited) Add while 1 sleep(10) Wend After the HotKeys Edit - Beaten again. Edited June 1, 2006 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
herewasplato Posted June 1, 2006 Share Posted June 1, 2006 (edited) ...and I was ready to post a loop with Sleep(111) Edit: BTW, HotKeys interrupt Sleeps - so it really does not matter how long of a sleep you use, but too short of a sleep can impact the CPU cycles consumed during the idling loop. [There, now maybe that post was worth something :-)] Edited June 1, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AzKay Posted June 1, 2006 Author Share Posted June 1, 2006 Thanks for the quick help ^^ # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
AzKay Posted June 1, 2006 Author Share Posted June 1, 2006 Thanks for the quick help ^^Ok, another problem, when I run the script, I test it in Scite, exampleI run the scriptI click on the text boxI press "2" which is one of the hotkeys, but its meant to then "Send" the "S" key twice.But it isnt, its just sending the number "2" # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Valuater Posted June 1, 2006 Share Posted June 1, 2006 All of the number and letter keys have an output character use F-Keys.... F1, F2, F3... etc or Ctrl-Alt-1, Ctrl-Alt-2...etc and there is no problem Link to comment Share on other sites More sharing options...
BigDod Posted June 1, 2006 Share Posted June 1, 2006 Are you using the numpad numbers or the regular numbers as they are different. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
herewasplato Posted June 1, 2006 Share Posted June 1, 2006 HotKeySet("2", "BackDash")notHotKeySet("{2}", "BackDash") [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AzKay Posted June 1, 2006 Author Share Posted June 1, 2006 Ahh, ok. @BigDod Regular # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
herewasplato Posted June 1, 2006 Share Posted June 1, 2006 You can also do this:Send("WW") @Others, Does the help file suggest the {} are needed or best for a string? [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Valuater Posted June 1, 2006 Share Posted June 1, 2006 You can also do this:Send("WW") @Others, Does the help file suggest the {} are needed or best for a string? I am pretty sure....No however when making send commands with multiple letters, its probably safer to use the "raw" method Send("WW", 1) 8) Link to comment Share on other sites More sharing options...
AzKay Posted June 1, 2006 Author Share Posted June 1, 2006 Ok, I tested it in a text box, works fine, it sends the right keys, everythings fine...But, when i use the hotkeys In-Game, they dont do anything, its supposed to example DashForward is the w key twice, because w is to walk forward, on the game, if you want to dash, you press it twice... but its not doing anything...Any ideas? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
herewasplato Posted June 1, 2006 Share Posted June 1, 2006 I am pretty sure....No...Thanks....and since I've hijacked yet another thread...What did you mean by:All of the number and letter keys have an output character...??? [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Valuater Posted June 1, 2006 Share Posted June 1, 2006 (edited) if you press most F-Keys, there is no character output to the screen same with most control shift/Alt keys ( they maybe a hotkey) with letters and numbers there is an actual output to the screen 8) Edited June 1, 2006 by Valuater Link to comment Share on other sites More sharing options...
herewasplato Posted June 1, 2006 Share Posted June 1, 2006 (edited) Have you seen behavior other than that described in the help file?When you set a hotkey, AutoIt captures the keypress and does not pass it on to the active application...Edit: Or am I still not understanding "output to the screen".Exceptions: http://www.autoitscript.com/forum/index.php?showtopic=26920 Edited June 1, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AzKay Posted June 1, 2006 Author Share Posted June 1, 2006 Wha? im getting confused, does this have anything to do with the question i asked about 4 posts ago? # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Valuater Posted June 1, 2006 Share Posted June 1, 2006 Plato... you are correct it does lock the "output" i never used letters or numbers for hot keys ( directly) for the main reason of wanting full use of the keyboard letter/numbers for writting.... and not getting a letter/number and the hotkey/send ( i really thought i tested this before) HotKeySet("a", "Sendit") Run("notepad.exe") WinWaitActive("") While 1 Sleep(10) WEnd Func Sendit() Send("test") EndFunc sorry for the mis-direction 8) Link to comment Share on other sites More sharing options...
herewasplato Posted June 1, 2006 Share Posted June 1, 2006 Wha? im getting confused, does this have anything to do with the question i asked about 4 posts ago?Sorry for the confusion. That is what I meant by "...and since I've hijacked yet another thread..." you can ignore all of the banter below that post (or you could learn from it - it is related). You got your answer in post #10 (meaning that your script should work fine as is - you can keep the {} around your characters if you wish) - the rest is just FYI for you and us having a discussion about HotKeySet (in your thread - sorry again).@Valuater,No problem, I just could not reconcile the help file with that statement and thought that I did not understand the statement. I've spent a lot of time with CapsLock and ScrollLock due to that bug report... so all of this is fresh (but confused) in my mind. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
AzKay Posted June 1, 2006 Author Share Posted June 1, 2006 Its still not working though, the script is working fine, but not ingame, i go into the game, run the script, but nothing happens. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
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