Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VBscript SendKeys

Options
  • 12-05-2006 2:56pm
    #1
    Registered Users Posts: 207 ✭✭


    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 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