Welcome Guest.   Make a donation to an author on the site October 25, 2014, 02:01:24 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the full one-year retrospective report on DonationCoder.com.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Question about AutoHotkey scripting  (Read 6066 times)
jdd
Charter Member
***
Posts: 214


see users location on a map View Profile Give some DonationCredits to this forum member
« on: August 01, 2010, 01:03:58 PM »

Is it possible to create a hotkey that does not require simultaneous pressing of keys?

For example, I would like to create a hotkey combination that is based on pressing two keys in rapid succession like "KK" or "KL".

Thanks,
jdd
Logged
mouser
First Author
Administrator
*****
Posts: 33,590



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: August 01, 2010, 01:12:41 PM »

you might try TapTap Hotkey Extender:
http://www.donationcoder....um/index.php?topic=5971.0
Logged
J-Mac
Supporting Member
**
Posts: 2,867


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: August 01, 2010, 03:33:44 PM »

you might try TapTap Hotkey Extender:
http://www.donationcoder....um/index.php?topic=5971.0

mouser,

Last update in November 2006? The download page claims it only works through XP. True?

Thank you.

Jim
Logged

"I am getting so tired of slitting the throats of people who say that I am a violent psychopath."
mouser
First Author
Administrator
*****
Posts: 33,590



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: August 01, 2010, 03:38:55 PM »

Quote
The download page claims it only works through XP. True?
lies!
Logged
J-Mac
Supporting Member
**
Posts: 2,867


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: August 01, 2010, 03:52:39 PM »

 harhar
Logged

"I am getting so tired of slitting the throats of people who say that I am a violent psychopath."
jdd
Charter Member
***
Posts: 214


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #5 on: August 01, 2010, 06:47:27 PM »

so.....is it correct to assume that it is not possible to create a hotkey combination in Autohotkey that is based on pressing two keys in rapid succession?
Logged
Target
Honorary Member
**
Posts: 1,410



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: August 01, 2010, 07:50:21 PM »

so.....is it correct to assume that it is not possible to create a hotkey combination in Autohotkey that is based on pressing two keys in rapid succession?

no sure I'd so far as to say that, but I'm not sure how I'd approach it...

perhaps a hotkey for K that watches for a subsequent (K) key press within a defined period 
Logged

"Look wise, say nothing, and grunt. Speech was given to conceal thought" - Sir William Osler
OkRob
Supporting Member
**
Posts: 19

View Profile Give some DonationCredits to this forum member
« Reply #7 on: August 01, 2010, 08:37:43 PM »

Not sure what you're trying to send by pressing the keys, but something like this works:

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. :R*?:ttt::
  2. FormatTime, CurrentDateTime,, HH:mm
  3. SendInput %CurrentDateTime%
Pressing the "t" 3 times sends the current time in HH:mm format

To send a text string, this works:

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. :R*?:ppp::
  2. SendInput This is my string of text
Typing "p" 3 times sends This is my string of text

Might try something along those lines if it will work for you. I use the ones above and others similar all the time to save me time with commonly typed text, etc. Note that I have them set to send after 3 keypresses as hardly any words I will ever type contain 3 of those letters in succession.
« Last Edit: August 01, 2010, 08:43:47 PM by OkRob » Logged
skwire
Global Moderator
*****
Posts: 4,116



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: August 01, 2010, 09:03:55 PM »

Is it possible to create a hotkey that does not require simultaneous pressing of keys?

Here's one method to double-tap "k".

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. ~k::
  2. {
  3.    {
  4.        MsgBox, Success.
  5.    }
  6. }

Logged

jdd
Charter Member
***
Posts: 214


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #9 on: August 04, 2010, 05:40:22 AM »

I should have been more specific.  What I want to do is to be able to type kk to simulate control-Alt-F4.
Logged
skwire
Global Moderator
*****
Posts: 4,116



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #10 on: August 04, 2010, 05:51:48 AM »

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. ~k::
  2. {
  3.    {
  4.        SendInput, ^!{F4}
  5.    }
  6. }
Logged

jdd
Charter Member
***
Posts: 214


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #11 on: August 05, 2010, 03:44:15 PM »

skwire,  That worked like a charm! Thmbsup

Can you show me the script to use kj to simulate control-Alt-F4?

Thanks,
jdd
Logged
jdd
Charter Member
***
Posts: 214


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #12 on: August 07, 2010, 06:43:49 PM »

Mouser,

Can TapTap Hotkey Extender be used to simulate three simultaneous keystrokes such as Ctrl-Alt-F4 by tapping with one hand?  I couldn't seem to get the syntax right in the ini file.

Thanks,
jdd
Logged
skwire
Global Moderator
*****
Posts: 4,116



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: August 09, 2010, 07:51:21 AM »

Do as OkRob suggested and use a hotstring:

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. :*?:kj::
  2. {
  3.    SendInput, ^!{F4}
  4. }
Logged

mouser
First Author
Administrator
*****
Posts: 33,590



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #14 on: August 09, 2010, 03:30:26 PM »

Quote
Can TapTap Hotkey Extender be used to simulate three simultaneous keystrokes
not sure what you are asking -- taptap can't detect a triple tap, only double taps (though this is possibly something that could be added); but it should be able to simulate combinations of 3 or more keys when triggered.

regarding taptap solution vs autohotkey solution, ahk is an incredibly powerful and versatile tool that can do tons of things.
wheras taptap was designed with one thing in mind, detecting these kinds of tapping keypresses as efficiently as possible with smallest impact on cpu and memory and resources.

this is something to care about because these are keypresses that are happening constantly as you type, and you don't want it slowing down your pc.

while i can't say definitively that taptap works more efficiently for this task, that would be my strong suspicion and i'd love to see some benchmarks comparing the two approaches.  though in truth it may be that the impact is minimal, when doing anything but heavy keyboard pounding, if even then.
« Last Edit: August 09, 2010, 03:33:27 PM by mouser » Logged
jdd
Charter Member
***
Posts: 214


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #15 on: August 09, 2010, 04:23:43 PM »

skwire, Thank you. That is what I was trying to do.  I am not trying to create hotstrings. 

The reason behind this query is that I am not very adept at using a keyboard.  For me, hot keys that require 3 keys pressed simultaneously (or even two) is very cumbersome.  Since I use a lot of hotkey combinations, the ability to create some using a one-hand 'tap tap' procedure is very powerful. 

Fortunately, I have two hands.  I can see how this would be a great tool for a person with one.

jdd
Logged
jdd
Charter Member
***
Posts: 214


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #16 on: August 09, 2010, 05:44:07 PM »

Mouser,

I am trying to simulate/define hotkeys that normally require simultaneous pressing of three keys (e.g. Ctrl-Alt-Delete).  I would like to launch these hotkeys using a NON-SIMULTANEOUS pressing of two keystrokes. 

So in this example, I would like to define a sequence of two NON-SIMULTANEOUS (e.g. 'k' followed by 'j') to simulate 'Ctrl-Alt-Delete'. Do you follow?

Can I do this in TapTap Hotkey Extender?
Logged
OkRob
Supporting Member
**
Posts: 19

View Profile Give some DonationCredits to this forum member
« Reply #17 on: August 09, 2010, 06:04:42 PM »

If I am interpreting what you wish to do correctly, the script that skwire posted above will do exactly what you wish... hit k, release it then hit j and it will sent Ctrl-Alt-F4. Substitute {Delete} for {F4} and it wll send Ctrl-Alt-Delete if you hit k and then j. I would use a sequence like kkk though, as it's easier to send and a legitimate word containing kkk which would trigger your hotkey is less likely to occur.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.104s | Server load: 0.42 ]