AutoHotkey Community

It is currently May 27th, 2012, 5:33 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: March 12th, 2010, 8:19 pm 
I searched through the Help doc. and in the forums but couldn't find exactly what I'm looking for, so here goes.

Code:
^3:: 
SendInput, {LCtrl}3
Sleep, 1000
SendInput, 1
Sleep, 800
SendInput, 2
Return
F2:: 
SendInput, {F2}
Sleep, 1000
SendInput, 1
Sleep, 800
SendInput, 2
Return
x:: 
SendInput, x
Sleep, 1000
SendInput, 2
Sleep, 800
SendInput, 3
Return


As per the title, can you 'SendInput' the same key as is your "Hotkey" for said command?? (See the Examples above)

And also is the terminology correct for "SendInput-ing" the "F" keys and "Control" keys above??

As always thanks for your help.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 12th, 2010, 8:22 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
You should use the $ modifier for hotkeys that Send themselves. See the table of modifiers.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 12th, 2010, 9:00 pm 
Offline

Joined: November 23rd, 2009, 2:11 pm
Posts: 104
it seems that you could use the "~" modifier which is used to stop it from blocking the key in the first place. if you use it, you can omit the first sendinput line completely

Code:
~^3::
Sleep, 1000
SendInput, 1
Sleep, 800
SendInput, 2
Return
~F2::
Sleep, 1000
SendInput, 1
Sleep, 800
SendInput, 2
Return
~x::
Sleep, 1000
SendInput, 2
Sleep, 800
SendInput, 3
Return

_________________
  /\ /\ This is Kitty
(>';'<) Cut, copy, and paste kitty onto your sig.
((")(")) Help Kitty gain World Domination.

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], dra, HotkeyStick, rbrtryn, XstatyK and 63 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group