StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
 All Forums
 Lua Scripts
 Internal Functions (actions)
 Details on acSendKeys() Usage

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Rob Posted - 12/22/2011 : 09:49:41
SendKeys commands:

Based on the following project:
http://www.codeproject.com/KB/cpp/sendkeys_cpp_Article.aspx

----

Key Modifiers (indicate the button should be pressed along with the following character, useful for sending ALT+H, which would read "%h"):

@ = WINKEY
+ = SHIFT
^ = CTRL
% = ALT

Other Functions:

{VKEY X} - Sends the VKEY specified. Useful if there's a VKEY I don't have defined. For example, {VKEY 13} is equivalent to VK_RETURN.
See: http://msdn.microsoft.com/en-us/library/dd375731%28v=VS.85%29.aspx

{BEEP X Y} - Beeps with a frequency of X and a duration of Y ms.

{DELAY X} - Delays sending the next key of X milliseconds.
After the delaying the following key, the subsequent keys will not be further delayed unless there is a default delay value (see DELAY=X).
Example: {DELAY 1000} <-- delays subsequent key stroke for 1 second.

{DELAY=X} - Sets the default delay value to X milliseconds. This will cause every key to be delayed X ms.
If a value is already set and you specify {DELAY Y} you will have your following key delay Y ms but the subsequent keys will be delayed X ms.
Example: {DELAY=1000} <-- all subsequent keys will be delayed for 1 second.

Full SendKeys listing:

{ADD} = VK_ADD
{APPS} = VK_APPS
{AT} = @
{BACKSPACE} = VK_BACK
{BKSP} = VK_BACK
{BREAK} = VK_CANCEL
{BROWSERBACK} = VK_BROWSER_BACK
{BROWSERFAVORITES} = VK_BROWSER_FAVORITES
{BROWSERFORWARD} = VK_BROWSER_FORWARD
{BROWSERHOME} = VK_BROWSER_HOME
{BROWSERREFRESH} = VK_BROWSER_REFRESH
{BROWSERSEARCH} = VK_BROWSER_SEARCH
{BROWSERSTOP} = VK_BROWSER_STOP
{BS} = VK_BACK
{CAPSLOCK} = VK_CAPITAL
{CARET} = ^
{CLEAR} = VK_CLEAR
{DECIMAL} = VK_DECIMAL
{DEL} = VK_DELETE
{DELETE} = VK_DELETE
{DIVIDE} = VK_DIVIDE
{DOWN} = VK_DOWN
{END} = VK_END
{ENTER} = VK_RETURN
{ESC} = VK_ESCAPE
{ESCAPE} = VK_ESCAPE
{F10} = VK_F10
{F11} = VK_F11
{F12} = VK_F12
{F13} = VK_F13
{F14} = VK_F14
{F15} = VK_F15
{F16} = VK_F16
{F_1} = VK_F1
{F_2} = VK_F2
{F_3} = VK_F3
{F_4} = VK_F4
{F_5} = VK_F5
{F_6} = VK_F6
{F_7} = VK_F7
{F_8} = VK_F8
{F_9} = VK_F9
{HELP} = VK_HELP
{HOME} = VK_HOME
{INS} = VK_INSERT
{LBRACE} = {
{LEFT} = VK_LEFT
{LPAREN} = (
{LWIN} = VK_LWIN
{MEDIANEXTTRACK} = VK_MEDIA_NEXT_TRACK
{MEDIAPLAYPAUSE} = VK_MEDIA_PLAY_PAUSE
{MEDIAPREVTRACK} = VK_MEDIA_PREV_TRACK
{MEDIASTOP} = VK_MEDIA_STOP
{MULTIPLY} = VK_MULTIPLY
{NUMLOCK} = VK_NUMLOCK
{NUMPAD0} = VK_NUMPAD0
{NUMPAD1} = VK_NUMPAD1
{NUMPAD2} = VK_NUMPAD2
{NUMPAD3} = VK_NUMPAD3
{NUMPAD4} = VK_NUMPAD4
{NUMPAD5} = VK_NUMPAD5
{NUMPAD6} = VK_NUMPAD6
{NUMPAD7} = VK_NUMPAD7
{NUMPAD8} = VK_NUMPAD8
{NUMPAD9} = VK_NUMPAD9
{PERCENT} = %
{PGDN} = VK_NEXT
{PGUP} = VK_PRIOR
{PLUS} = +
{PRTSC} = VK_PRINT
{RBRACE} = }
{RIGHT} = VK_RIGHT
{RPAREN} = )
{RWIN} = VK_RWIN
{SCROLL} = VK_SCROLL
{SEPARATOR} - VK_SEPARATOR
{SLEEP} - VK_SLEEP
{SNAPSHOT} = VK_SNAPSHOT
{SUBTRACT} - VK_SUBTRACT
{TAB} = VK_TAB
{TILDE} = ~
{UP} = VK_UP
{VOLDOWN} = VK_VOLUME_DOWN
{VOLMUTE} = VK_VOLUME_MUTE
{VOLUP} = VK_VOLUME_UP
{WIN} = VK_LWIN
14   L A T E S T    R E P L I E S    (Newest First)
Hard.Wired Posted - 06/15/2019 : 00:25:54
{VKEY 0x13}
Windie Posted - 06/14/2019 : 20:54:13
How to send Pause key ?
Rob Posted - 06/14/2019 : 07:48:56
acSendKeys("\"") --Sends one "
acSendKeys("\"\"") --Sends two ""

You simply have to escape quotation marks with a preceding backslash.
limitless1689 Posted - 06/14/2019 : 00:19:08
Is there a way to send double quotation marks "" ?
freakpaul Posted - 06/03/2015 : 13:34:49
Hey Rob,
I have figured it out. On english keyboards this is the {HOME} button.
Thanks for your answer.
Rob Posted - 06/01/2015 : 16:34:56
No clue. Maybe see if this detects the key press?

http://delphiforfun.org/programs/utilities/KeyCodes.htm
freakpaul Posted - 05/31/2015 : 13:53:45
Hey,

any clue which virtual key is equal to "POS1"?
http://l7.alamy.com/zooms/dc6098deceff49a7b6cc03ffee15e5ce/pos1-key-on-a-keyboard-ct78gn.jpg
Rob Posted - 05/05/2015 : 09:37:52
Should just have to escape it with a backslash, but not at my computer to confirm. E.g.

acSendKeys("Here is a \" ")
Mersine Posted - 05/05/2015 : 09:33:27
Hi Rob,

Long time no talk. I'm glad your project is still going strong, I use strokeplus very often. Quick question, what is the key for quotes?

" = ???

Thanks
Rob Posted - 01/30/2014 : 10:40:21
The Fn key is very tricky as the combinations you probably want to use are generally captured by a driver which is watching the physical keyboard input, not synthesized input; I've had no luck getting it to work at all. Though technically, acSendKeyDown(255) / acSendKeyUp(255) sends the Fn down/up events.

acSendKeys(" ") works too
mdx Posted - 01/30/2014 : 02:11:12
is there any way to send the Fn (function) key?

Also, SPACEBAR seems to be missing, so I used {VKEY 32} which worked fine.
Rob Posted - 10/03/2013 : 09:16:25
Sure, Windows calls the Print Screen function "snapshot":

--Print Screen
acSendKeys("{SNAPSHOT}")

--ALT+Print Screen
acSendKeys("%{SNAPSHOT}")
ycomp Posted - 10/03/2013 : 09:12:49
is there any way to send keys globally?

For instance I want to trigger a PrntScr or Alt-PrntScr
Rob Posted - 02/19/2012 : 19:48:06
The previous post reads "Full SendKeys listing", but it's really just a list of the special/reserved characters.

For example, acSendKeys("hello world") types "hello world".

StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000