tonsafun Posted February 13, 2004 Posted February 13, 2004 ok i am having a problem, i cant find how to do this. when i push A, i want it to a different letter picked from an array randomly, so if i push A, it might send D or B. how would i do this?
tonsafun Posted February 13, 2004 Author Posted February 13, 2004 Use AutoItv3 (beta) HotKeySet("a","RandomLetter") While 1 Sleep(100) Wend Func RandomLetter() $a = StringSplit("BCD","") Send($a[Int(RANDOM(3))]) EndFunccan u break that down for me what each thing does? i am not that good at autoit
tonsafun Posted February 13, 2004 Author Posted February 13, 2004 (edited) so its not possible? it was for the arrows, if i hit any of the arrows i wanted it to push a random letter any ideas on what can be done? Edited February 13, 2004 by tonsafun
tonsafun Posted February 13, 2004 Author Posted February 13, 2004 k thx worked well, but can i delay the send key to every second?
tonsafun Posted February 13, 2004 Author Posted February 13, 2004 that does nothing, any other ideas? thx for the help btw
tonsafun Posted February 13, 2004 Author Posted February 13, 2004 (edited) i got it, sorry im newb that found the help file AutoItSetOption ("SendKeyDelay", 1000) does the job anyway to make it more random? it draws same pick quite often sorry for bugging btw Edited February 13, 2004 by tonsafun
tonsafun Posted February 13, 2004 Author Posted February 13, 2004 (edited) it over flows when i do that can it be prevented? also im doing 4 letters...not 3 so it never draws the 4th Edited February 13, 2004 by tonsafun
tonsafun Posted February 13, 2004 Author Posted February 13, 2004 hmm when i set it as a hotkey, the key ignores its original function, i need it to do the new function, and the original function.
tonsafun Posted February 14, 2004 Author Posted February 14, 2004 yea i dont want that delayed i want that as normal
tonsafun Posted February 14, 2004 Author Posted February 14, 2004 was wondering if u can do something like, if certainbutton pushed then blahblablha endif
tonsafun Posted February 14, 2004 Author Posted February 14, 2004 well i need the up button to function as the up button as normal, and also push one of the four buttons (jkl;) at the same time with a one second delay, but the up button should run as normal with no delays
CyberSlug Posted February 14, 2004 Posted February 14, 2004 Don't know if this will help but, note that you can un-register a hotkey: ; When you press the left arrow key, the result is Ctrl+Left ; which usually jumps the keyboard cursor to the previous ; word in a text editor HotKeySet("{Left}", "foo") sleep(0) ;script runs forever until you terminate via tray icon Func foo() HotKeySet("{Left}") ;unregister hotkey so that the the left arrow key can be sent ; without causing foo() to call itself infinitely Send("^{Left}") HotKeySet("{Left}", "foo") ;re-register hotkey EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
tonsafun Posted February 14, 2004 Author Posted February 14, 2004 looks good, very good idea let me test it
CyberSlug Posted February 14, 2004 Posted February 14, 2004 that is quite inJeanyus... Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
tonsafun Posted February 14, 2004 Author Posted February 14, 2004 (edited) how do u pause for a certain amount of time ? nvm got it Edited February 14, 2004 by tonsafun
tonsafun Posted February 14, 2004 Author Posted February 14, 2004 (edited) this is what did it HotKeySet("{UP}","RandomLetter") HotKeySet("{DOWN}","RandomLetter") HotKeySet("{LEFT}","RandomLetter") HotKeySet("{RIGHT}","RandomLetter") $key = StringSplit("JKL;","") While 1 Sleep(10) Wend Func RandomLetter() HotKeySet("{UP}") HotKeySet("{DOWN}") HotKeySet("{LEFT}") HotKeySet("{RIGHT}") AutoItSetOption ("SendKeyDelay", 1000) Send($key[Int(RANDOM(4)+1)]) HotKeySet("{UP}","RandomLetter") HotKeySet("{DOWN}","RandomLetter") HotKeySet("{LEFT}","RandomLetter") HotKeySet("{RIGHT}","RandomLetter") EndFunc one last question, is it possible to open IE and go to a webpage Edited February 14, 2004 by tonsafun
tonsafun Posted February 15, 2004 Author Posted February 15, 2004 where in here is shift being pushed? cause it is somewhere, plz i need it gone. HotKeySet("{UP}","RandomLetter") HotKeySet("{DOWN}","RandomLetter") HotKeySet("{LEFT}","RandomLetter") HotKeySet("{RIGHT}","RandomLetter") $key = StringSplit("JKL;","") While 1 Sleep(10) Wend Func RandomLetter() HotKeySet("{UP}") HotKeySet("{DOWN}") HotKeySet("{LEFT}") HotKeySet("{RIGHT}") AutoItSetOption ("SendKeyDelay", 1000) Send($key[Int(RANDOM(4)+1)]) HotKeySet("{UP}","RandomLetter") HotKeySet("{DOWN}","RandomLetter") HotKeySet("{LEFT}","RandomLetter") HotKeySet("{RIGHT}","RandomLetter") EndFunc
CyberSlug Posted February 15, 2004 Posted February 15, 2004 You are sending uppercase letters$key = StringSplit("JKL;","")Uppercase letters are Shift+lowercaseMaybe try:StringSplit("{ShiftDown}j{ShiftUp},{ShiftDown}k{ShiftUp},{ShiftDown}l{ShiftUp},;", ",")I've also had problems with shift.... this topic Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
CyberSlug Posted February 15, 2004 Posted February 15, 2004 Run('"C:\Program Files\Internet Explorer\IEXPLORE.EXE" "http://www.hiddensoft.com/"') Or it might be better to use (@ProgramFilesDir & '\Internet Explorer\iexplore.exe' & ' "http://www.hiddensoft.com/"') Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
tonsafun Posted February 16, 2004 Author Posted February 16, 2004 can i just change to $key = StringSplit("jkl;","")?
Recommended Posts