Jump to content

help keyboard functions


emu
 Share

Recommended Posts

ok well i need to have the script hold down shift + down for x amount of seconds and then shift + rigth for x amount of seconds i know there is the "Send("{a down}")" but how do i make it only for so many seconds?

Link to comment
Share on other sites

Try the following:

$x = 5000 ;number in milliseconds; adjust as needed

Opt("SendKeyDownDelay", $x)

Send("+{Down}")

Send("+{Right}")

Read the Send documentation if you have any questions.

In case the above doesn't work like I expect:

$t = 5000;time in milliseconds
$init = TimerInit()
Send("{ShiftDown}{RIGHT down}")
While TimerDiff($init) < $t
    sleep(10)
WEnd
Send("{RIGHT up}{ShiftUp}")
Edited by CyberSlug
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

well i need them to be held down for a differnet amount of time

<{POST_SNAPBACK}>

Then why did you use the variable x in both cases? :)

Opt("SendKeyDownDelay", 123)

Send("+{Down}")

Opt("SendKeyDownDelay", 456)

Send("+{Right}")

I also modified my above post to offer a different possibility.

Edited by CyberSlug
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...