Jump to content

If Button Pushed, Push Another


tonsafun
 Share

Recommended Posts

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
Link to comment
Share on other sites

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!
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

You are sending uppercase letters

$key = StringSplit("JKL;","")

Uppercase letters are Shift+lowercase

Maybe 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!
Link to comment
Share on other sites

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!
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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