Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

VBscript SendKeys

  • 12-05-2006 02:56PM
    #1
    Registered Users, Registered Users 2 Posts: 209 ✭✭


    Does anyone know how i can use the sendkeys command in VBScript to stimulate an ALT character code like ALT + 108? Or it might be done using ascii codes?


Comments

  • Registered Users, Registered Users 2 Posts: 1,456 ✭✭✭FSL


    To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:

    Key Code
    SHIFT +
    CTRL ^
    ALT %


    To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down ALT while E and C are pressed, use "%(EC)". To specify to hold down ALT while E is pressed, followed by C without SHIFT, use "%EC".

    To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 42} means press the LEFT ARROW key 42 times; {h 10} means press H 10 times.

    Note You can't use SendKeys to send keystrokes to an application that is not designed to run in Microsoft Windows. Sendkeys also can't send the PRINT SCREEN key {PRTSC} to any application.


Advertisement