Jump to content

Recommended Posts

Posted

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?

Posted

Use AutoItv3 (beta)

HotKeySet("a","RandomLetter")

While 1
     Sleep(100)
Wend

Func RandomLetter()
     $a = StringSplit("BCD","")
     Send($a[Int(RANDOM(3))])
EndFunc
can u break that down for me what each thing does? i am not that good at autoit
Posted (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 by tonsafun
Posted (edited)

i got it, sorry im newb that found the help file :whistle:

AutoItSetOption ("SendKeyDelay", 1000)

does the job

anyway to make it more random? it draws same pick quite often sorry for bugging btw

Edited by tonsafun
Posted (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 by tonsafun
Posted

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

Posted

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!
Posted (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 by tonsafun
Posted

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...