Send keys.send List

SOLVED Discussion in 'Web Design & Coding' started by Comptech, Dec 12, 2011.

  1. Comptech

    Comptech ICT Technican

    Joined:
    Dec 11, 2011
    Messages:
    16
    Likes Received:
    14
    Location:
    UK
    [FONT=&quot]To send the ASCII value A (same as pressing ALT+065 on the numeric keypad)[/FONT]
    [FONT=&quot]Send("{ASC 065}")[/FONT]

    [FONT=&quot](When using 2 digit ASCII codes you must use a leading 0, otherwise an obsolete 437 code page is used).[/FONT]
    [FONT=&quot]To send UNICODE characters enter the character code, for example this sends a Chinese character[/FONT]
    [FONT=&quot]Send("{ASC 2709}")[/FONT]

    [FONT=&quot]Single keys can also be repeated, e.g.[/FONT]
    [FONT=&quot]Send("{DEL 4}") ;Presses the DEL key 4 times
    Send("{S 30}") ;Sends 30 'S' characters
    Send("+{TAB 4}") ;Presses SHIFT+TAB 4 times[/FONT]


    [FONT=&quot]To hold a key down (generally only useful for games)[/FONT]
    [FONT=&quot]Send("{a down}") ;Holds the A key down
    Send("{a up}") ;Releases the A key[/FONT]


    [FONT=&quot]If you with to use a variable for the count, try [/FONT]
    [FONT=&quot]$n = 4
    Send("+{TAB " & $n & "}")[/FONT]


    [FONT=&quot]If you wish to send the ASCII value A four times, then try [/FONT]
    [FONT=&quot]$x = Chr(65)
    Send("{" & $x & " 4}")[/FONT]


    [FONT=&quot]Most laptop computer keyboards have a special Fn key. This key cannot be simulated.

    Note, by setting the flag parameter to 1 the "keys" parameter is sent RAW. This is useful when you want to send some text copied from a variable and you want the text sent exactly as written.


    Send is quite useful because windows can be navigated without needing a mouse.

    For example, open Folder Options (in the control panel) and try the following:[/FONT]

    [FONT=&quot]Send("{TAB}")[/FONT]
    [FONT=&quot]Navigate to next control (button, checkbox, etc)[/FONT]
    [FONT=&quot]Send("+{TAB}")[/FONT]
    [FONT=&quot]Navigate to previous control.[/FONT]
    [FONT=&quot]Send("^{TAB}")[/FONT]
    [FONT=&quot]Navigate to next WindowTab (on a Tabbed dialog window)[/FONT]
    [FONT=&quot]Send("^+{TAB}")[/FONT]
    [FONT=&quot]Navigate to previous WindowTab.[/FONT]
    [FONT=&quot]Send("{SPACE}")[/FONT]
    [FONT=&quot]Can be used to toggle a checkbox or click a button.[/FONT]
    [FONT=&quot]Send("{+}")[/FONT]
    [FONT=&quot]Usually checks a checkbox (if it's a "real" checkbox.)[/FONT]
    [FONT=&quot]Send("{-}")[/FONT]
    [FONT=&quot]Usually unchecks a checkbox.[/FONT]
    [FONT=&quot]Send("{NumPadMult}")[/FONT]
    [FONT=&quot]Recursively expands folders in a SysTreeView32. [/FONT]


    [FONT=&quot]

    Use Alt-key combos to access menu items. Also, open Notepad and try the following:[/FONT]

    [FONT=&quot]Send("!f")[/FONT]
    [FONT=&quot]Send Alt+f, the access key for Notepad's file menu. Try other letters![/FONT]
    [FONT=&quot]Send("{DOWN}")[/FONT]
    [FONT=&quot]Move down a menu.[/FONT]
    [FONT=&quot]Send("{UP}")[/FONT]
    [FONT=&quot]Move up a menu.[/FONT]
    [FONT=&quot]Send("{LEFT}")[/FONT]
    [FONT=&quot]Move leftward to new menu or expand a submenu.[/FONT]
    [FONT=&quot]Send("{RIGHT}")[/FONT]
    [FONT=&quot]Move rightward to new menu or collapse a submenu.[/FONT]
    [FONT=&quot]

    See Windows' Help--press Win+F1--for a complete list of keyboard shortcuts if you don't know the importance of Alt+F4, PrintScreen, Ctrl+C, and so on.

    [/FONT]

    [FONT=&quot]Send Command (if zero flag)[/FONT][FONT=&quot][/FONT]
    [FONT=&quot]Resulting Keypress[/FONT][FONT=&quot][/FONT]
    [FONT=&quot]{!}[/FONT]
    [FONT=&quot]![/FONT]
    [FONT=&quot]{#}[/FONT]
    [FONT=&quot]#[/FONT]
    [FONT=&quot]{+}[/FONT]
    [FONT=&quot]+[/FONT]
    [FONT=&quot]{^}[/FONT]
    [FONT=&quot]^[/FONT]
    [FONT=&quot]{{}[/FONT]
    [FONT=&quot]{[/FONT]
    [FONT=&quot]{}}[/FONT]
    [FONT=&quot]}[/FONT]
    [FONT=&quot]{SPACE}[/FONT]
    [FONT=&quot]SPACE[/FONT]
    [FONT=&quot]{ENTER}[/FONT]
    [FONT=&quot]ENTER key on the main keyboard[/FONT]
    [FONT=&quot]{ALT}[/FONT]
    [FONT=&quot]ALT[/FONT]
    [FONT=&quot]{BACKSPACE} or {BS}[/FONT]
    [FONT=&quot]BACKSPACE[/FONT]
    [FONT=&quot]{DELETE} or {DEL}[/FONT]
    [FONT=&quot]DELETE[/FONT]
    [FONT=&quot]{UP}[/FONT]
    [FONT=&quot]Up arrow[/FONT]
    [FONT=&quot]{DOWN}[/FONT]
    [FONT=&quot]Down arrow[/FONT]
    [FONT=&quot]{LEFT}[/FONT]
    [FONT=&quot]Left arrow[/FONT]
    [FONT=&quot]{RIGHT}[/FONT]
    [FONT=&quot]Right arrow[/FONT]
    [FONT=&quot]{HOME}[/FONT]
    [FONT=&quot]HOME[/FONT]
    [FONT=&quot]{END}[/FONT]
    [FONT=&quot]END[/FONT]
    [FONT=&quot]{ESCAPE} or {ESC}[/FONT]
    [FONT=&quot]ESCAPE[/FONT]
    [FONT=&quot]{INSERT} or {INS}[/FONT]
    [FONT=&quot]INS[/FONT]
    [FONT=&quot]{PGUP}[/FONT]
    [FONT=&quot]PGUP[/FONT]
    [FONT=&quot]{PGDN}[/FONT]
    [FONT=&quot]PGDN[/FONT]
    [FONT=&quot]{F1} - {F12}[/FONT]
    [FONT=&quot]Function keys[/FONT]
    [FONT=&quot]{TAB}[/FONT]
    [FONT=&quot]TAB[/FONT]
    [FONT=&quot]{PRINTSCREEN}[/FONT]
    [FONT=&quot]PRINTSCR[/FONT]
    [FONT=&quot]{LWIN}[/FONT]
    [FONT=&quot]Left Windows key[/FONT]
    [FONT=&quot]{RWIN}[/FONT]
    [FONT=&quot]Right Windows key[/FONT]
    [FONT=&quot]{NUMLOCK}[/FONT]
    [FONT=&quot]NUMLOCK[/FONT]
    [FONT=&quot]{BREAK}[/FONT]
    [FONT=&quot]for Ctrl+Break processing[/FONT]
    [FONT=&quot]{PAUSE}[/FONT]
    [FONT=&quot]PAUSE[/FONT]
    [FONT=&quot]{CAPSLOCK}[/FONT]
    [FONT=&quot]CAPSLOCK[/FONT]
    [FONT=&quot]{NUMPAD0} - {NUMPAD9}[/FONT]
    [FONT=&quot]Numpad digits[/FONT]
    [FONT=&quot]{NUMPADMULT}[/FONT]
    [FONT=&quot]Numpad Multiply[/FONT]
    [FONT=&quot]{NUMPADADD}[/FONT]
    [FONT=&quot]Numpad Add[/FONT]
    [FONT=&quot]{NUMPADSUB}[/FONT]
    [FONT=&quot]Numpad Subtract[/FONT]
    [FONT=&quot]{NUMPADDIV}[/FONT]
    [FONT=&quot]Numpad Divide[/FONT]
    [FONT=&quot]{NUMPADDOT}[/FONT]
    [FONT=&quot]Numpad period[/FONT]
    [FONT=&quot]{NUMPADENTER}[/FONT]
    [FONT=&quot]Enter key on the numpad[/FONT]
    [FONT=&quot]{APPSKEY}[/FONT]
    [FONT=&quot]Windows App key[/FONT]
    [FONT=&quot]{LALT}[/FONT]
    [FONT=&quot]Left ALT key[/FONT]
    [FONT=&quot]{RALT}[/FONT]
    [FONT=&quot]Right ALT key[/FONT]
    [FONT=&quot]{LCTRL}[/FONT]
    [FONT=&quot]Left CTRL key[/FONT]
    [FONT=&quot]{RCTRL}[/FONT]
    [FONT=&quot]Right CTRL key[/FONT]
    [FONT=&quot]{LSHIFT}[/FONT]
    [FONT=&quot]Left Shift key[/FONT]
    [FONT=&quot]{RSHIFT}[/FONT]
    [FONT=&quot]Right Shift key[/FONT]
    [FONT=&quot]{SLEEP}[/FONT]
    [FONT=&quot]Computer SLEEP key[/FONT]
    [FONT=&quot]{ALTDOWN}[/FONT]
    [FONT=&quot]Holds the ALT key down until {ALTUP} is sent[/FONT]
    [FONT=&quot]{SHIFTDOWN}[/FONT]
    [FONT=&quot]Holds the SHIFT key down until {SHIFTUP} is sent[/FONT]
    [FONT=&quot]{CTRLDOWN}[/FONT]
    [FONT=&quot]Holds the CTRL key down until {CTRLUP} is sent[/FONT]
    [FONT=&quot]{LWINDOWN}[/FONT]
    [FONT=&quot]Holds the left Windows key down until {LWINUP} is sent[/FONT]
    [FONT=&quot]{RWINDOWN}[/FONT]
    [FONT=&quot]Holds the right Windows key down until {RWINUP} is sent[/FONT]
    [FONT=&quot]{ASC nnnn}[/FONT]
    [FONT=&quot]Send the ALT+nnnn key combination[/FONT]


    [FONT=&quot]{BROWSER_BACK}[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "back" button[/FONT]
    [FONT=&quot]{BROWSER_FORWARD}[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "forward" button[/FONT]
    [FONT=&quot]{BROWSER_REFRESH}[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "refresh" button[/FONT]
    [FONT=&quot]{BROWSER_STOP}[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "stop" button[/FONT]
    [FONT=&quot]{BROWSER_SEARCH}[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "search" button[/FONT]
    [FONT=&quot]{BROWSER_FAVORITES}[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "favorites" button[/FONT]
    [FONT=&quot]{BROWSER_HOME}[/FONT]
    [FONT=&quot]2000/XP Only: Launch the browser and go to the home page[/FONT]
    [FONT=&quot]{VOLUME_MUTE}[/FONT]
    [FONT=&quot]2000/XP Only: Mute the volume[/FONT]
    [FONT=&quot]{VOLUME_DOWN}[/FONT]
    [FONT=&quot]2000/XP Only: Reduce the volume[/FONT]
    [FONT=&quot]{VOLUME_UP}[/FONT]
    [FONT=&quot]2000/XP Only: Increase the volume[/FONT]
    [FONT=&quot]{MEDIA_NEXT}[/FONT]
    [FONT=&quot]2000/XP Only: Select next track in media player[/FONT]
    [FONT=&quot]{MEDIA_PREV}[/FONT]
    [FONT=&quot]2000/XP Only: Select previous track in media player[/FONT]
    [FONT=&quot]{MEDIA_STOP}[/FONT]
    [FONT=&quot]2000/XP Only: Stop media player[/FONT]
    [FONT=&quot]{MEDIA_PLAY_PAUSE}[/FONT]
    [FONT=&quot]2000/XP Only: Play/pause media player[/FONT]
    [FONT=&quot]{LAUNCH_MAIL}[/FONT]
    [FONT=&quot]2000/XP Only: Launch the email application[/FONT]
    [FONT=&quot]{LAUNCH_MEDIA}[/FONT]
    [FONT=&quot]2000/XP Only: Launch media player[/FONT]
    [FONT=&quot]{LAUNCH_APP1}[/FONT]
    [FONT=&quot]2000/XP Only: Launch user app1[/FONT]
    [FONT=&quot]{LAUNCH_APP2}[/FONT]
    [FONT=&quot]2000/XP Only: Launch user app2[/FONT]

    This is a good refrance guide for sendkeys.send list however I am not the orignal poster I found this a long time ago but it is a good refrence guide so I thought I would post it here as well


    Kind Regards


    Bradley
     
    Comptech, Dec 12, 2011
    #1
    Zeus likes this.
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Convict2

    Widow xp cd keys

    Convict2, Oct 1, 2003, in forum: Software
    Replies:
    2
    Views:
    1,058
    James
    Oct 1, 2003
  2. onetime12

    F-keys not working...

    onetime12, Dec 29, 2004, in forum: Hardware
    Replies:
    3
    Views:
    992
    D Schrute
    Dec 29, 2004
  3. Nickweb

    keyboard keys are messed up

    Nickweb, Jan 22, 2005, in forum: Hardware
    Replies:
    6
    Views:
    1,013
    Nickweb
    Jan 24, 2005
  4. TheOneGreatX

    WASD or Arrow Keys?

    TheOneGreatX, Jan 28, 2005, in forum: General Discussion
    Replies:
    8
    Views:
    1,847
    casca
    Apr 7, 2005
  5. James

    stick-on letters for laptop keys

    James, Sep 27, 2003, in forum: DIY Computers
    Replies:
    2
    Views:
    511
    |||| || | ||||| ||||||||
    Sep 27, 2003
  6. jeebus

    keys dying on laptop.

    jeebus, Mar 1, 2004, in forum: DIY Computers
    Replies:
    7
    Views:
    666
    Ric H
    Mar 1, 2004
  7. James
    Replies:
    6
    Views:
    1,485
    son of a bitch
    Apr 8, 2009
Loading...