Splitz Posted July 31, 2008 Posted July 31, 2008 #include <Misc.au3> HotKeySet("6", "Hey") Func Hey() If _IsPressed("36") Then Send("4") Send("6") EndIf EndFunc when ever i press 6, it ONLY sends 4, i want the script to send 4 and then 6 when ever i press 6. so when i press 6 the test printed in a window would be: 46
Minikori Posted July 31, 2008 Posted July 31, 2008 #include <Misc.au3>HotKeySet("6", "Hey")Func Hey()If _IsPressed("36") Then Send("4") Send("6")EndIfEndFuncwhen ever i press 6, it ONLY sends 4, i want the script to send 4 and then 6 when ever i press 6.so when i press 6 the test printed in a window would be: 46Send("46")??? For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com
Vindicator209 Posted July 31, 2008 Posted July 31, 2008 (edited) im sorry, can't quite understand what your asking, you want the script to send the number "4" AND "6" whenever you press 6, correct? Then you need to disable the hotkey so it doesn't call itself again, because if you make it send 46 when you press 6, it will keep pressing 6, thus calling itself again so, to disable your hotkey, Hotkeyset("6","") HotKeySet("6", "Hey") While 1 Sleep(1000 Wend Func Hey() Hotkeyset("6","") Send("4") Send("6") HotKeySet("6", "Hey") EndFunc Edited July 31, 2008 by VindicatorOmega [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]
Splitz Posted July 31, 2008 Author Posted July 31, 2008 its still not working, its just spamming 4 non stop now
TehWhale Posted July 31, 2008 Posted July 31, 2008 Shouldn't the HotKeySet("6", "") be: HotKeySet("6")?
Vindicator209 Posted July 31, 2008 Posted July 31, 2008 (edited) Shouldn't the HotKeySet("6", "") be: HotKeySet("6")?yes, yes it should, I overlooked thatand there should be an ending parentheses after Sleep(1000sleep(1000) Edited July 31, 2008 by VindicatorOmega [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]
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