Send keys.send List

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

  1. Comptech

    Comptech ICT Technican

    Dec 11, 2011
    Likes Received:
    [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]Navigate to next control (button, checkbox, etc)[/FONT]
    [FONT=&quot]Navigate to previous control.[/FONT]
    [FONT=&quot]Navigate to next WindowTab (on a Tabbed dialog window)[/FONT]
    [FONT=&quot]Navigate to previous WindowTab.[/FONT]
    [FONT=&quot]Can be used to toggle a checkbox or click a button.[/FONT]
    [FONT=&quot]Usually checks a checkbox (if it's a "real" checkbox.)[/FONT]
    [FONT=&quot]Usually unchecks a checkbox.[/FONT]
    [FONT=&quot]Recursively expands folders in a SysTreeView32. [/FONT]


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

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

    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=&quot]Send Command (if zero flag)[/FONT][FONT=&quot][/FONT]
    [FONT=&quot]Resulting Keypress[/FONT][FONT=&quot][/FONT]
    [FONT=&quot]ENTER key on the main keyboard[/FONT]
    [FONT=&quot]{BACKSPACE} or {BS}[/FONT]
    [FONT=&quot]{DELETE} or {DEL}[/FONT]
    [FONT=&quot]Up arrow[/FONT]
    [FONT=&quot]Down arrow[/FONT]
    [FONT=&quot]Left arrow[/FONT]
    [FONT=&quot]Right arrow[/FONT]
    [FONT=&quot]{ESCAPE} or {ESC}[/FONT]
    [FONT=&quot]{INSERT} or {INS}[/FONT]
    [FONT=&quot]{F1} - {F12}[/FONT]
    [FONT=&quot]Function keys[/FONT]
    [FONT=&quot]Left Windows key[/FONT]
    [FONT=&quot]Right Windows key[/FONT]
    [FONT=&quot]for Ctrl+Break processing[/FONT]
    [FONT=&quot]{NUMPAD0} - {NUMPAD9}[/FONT]
    [FONT=&quot]Numpad digits[/FONT]
    [FONT=&quot]Numpad Multiply[/FONT]
    [FONT=&quot]Numpad Add[/FONT]
    [FONT=&quot]Numpad Subtract[/FONT]
    [FONT=&quot]Numpad Divide[/FONT]
    [FONT=&quot]Numpad period[/FONT]
    [FONT=&quot]Enter key on the numpad[/FONT]
    [FONT=&quot]Windows App key[/FONT]
    [FONT=&quot]Left ALT key[/FONT]
    [FONT=&quot]Right ALT key[/FONT]
    [FONT=&quot]Left CTRL key[/FONT]
    [FONT=&quot]Right CTRL key[/FONT]
    [FONT=&quot]Left Shift key[/FONT]
    [FONT=&quot]Right Shift key[/FONT]
    [FONT=&quot]Computer SLEEP key[/FONT]
    [FONT=&quot]Holds the ALT key down until {ALTUP} is sent[/FONT]
    [FONT=&quot]Holds the SHIFT key down until {SHIFTUP} is sent[/FONT]
    [FONT=&quot]Holds the CTRL key down until {CTRLUP} is sent[/FONT]
    [FONT=&quot]Holds the left Windows key down until {LWINUP} is sent[/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]2000/XP Only: Select the browser "back" button[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "forward" button[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "refresh" button[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "stop" button[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "search" button[/FONT]
    [FONT=&quot]2000/XP Only: Select the browser "favorites" button[/FONT]
    [FONT=&quot]2000/XP Only: Launch the browser and go to the home page[/FONT]
    [FONT=&quot]2000/XP Only: Mute the volume[/FONT]
    [FONT=&quot]2000/XP Only: Reduce the volume[/FONT]
    [FONT=&quot]2000/XP Only: Increase the volume[/FONT]
    [FONT=&quot]2000/XP Only: Select next track in media player[/FONT]
    [FONT=&quot]2000/XP Only: Select previous track in media player[/FONT]
    [FONT=&quot]2000/XP Only: Stop media player[/FONT]
    [FONT=&quot]2000/XP Only: Play/pause media player[/FONT]
    [FONT=&quot]2000/XP Only: Launch the email application[/FONT]
    [FONT=&quot]2000/XP Only: Launch media player[/FONT]
    [FONT=&quot]2000/XP Only: Launch user app1[/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

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

Ask a Question

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.