Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Holding character with send doesnt simulate keyboard exactly


  • Please log in to reply
2 replies to this topic
hank
  • Guests
  • Last active:
  • Joined: --
When i press and hold backspace down in a text document it deletes all characters untill i release backspace. But when i use send to hold down backspace it only deletes 1 character for some reason. I tried all various types of send, but i dont get the same reaction as if i hold down the same button on my keyboard.

Try this in text document

-::
Send {bs down}
Sleep 30000
Send {bs up}
Return

Can anyone tell my why it doesnt seem to send the same way as keyboard.

Superfraggle
  • Members
  • 1019 posts
  • Last active: Sep 25 2011 01:06 AM
  • Joined: 02 Nov 2004

To hold down or release a key: Enclose in braces the name of the key followed by the word Down or Up. For example:

Send {b down}{b up}
Send {TAB down}{TAB up}
Send {Up down} ; Press down the up-arrow key.
Sleep 1000 ; Keep it down for one second.
Send {Up up} ; Release the up-arrow key.

When a key is held down via the method above, it does not begin auto-repeating like it would if you were physically holding it down (this is because auto-repeat is a driver/hardware feature). However, a Loop can be used to simulate auto-repeat. The following example sends 20 tab keystrokes:

Loop 20
{
Send {Tab down} ; Auto-repeat consists of consecutive down-events (with no up-events).
Sleep 30 ; The number of milliseconds between keystrokes (or use SetKeyDelay).
}
Send {Tab up} ; Release the key.The word DownTemp may also be used. Its effect is the same as Down except for the modifer keys (Control/Shift/Alt/Win). In those cases, DownTemp tells subsequent sends that the key is not permanently down, and may be released whenever a keystroke calls for it. For example, Send {Control DownTemp} followed later by Send a would produce a normal "a" keystroke, not a control-A keystroke.


Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle

hank
  • Guests
  • Last active:
  • Joined: --
ok Thanks, i must have missed that part.