| View previous topic :: View next topic |
| Author |
Message |
brotherS
Joined: 01 Jun 2005 Posts: 147
|
Posted: Tue Jan 16, 2007 9:13 pm Post subject: is there a way to speed this up/prevent this? |
|
|
Hi,
I'm using this code:
| Code: | #Persistent
$+i::
SetTitleMatchMode, 3
IfWinActive, PROGRAM
{
BlockInput On
Send {AppsKey}
Send {Down 6}
Send {Right}
Send i
BlockInput Off
}
else
{
Send I
}
return
|
Most often it works just fine, but sometimes AHK isn't able to keep up with my typing speed (I'm typing fast, but not extremely fast), so when I type "In there" I may get "n Ithere" instead.
Is there a way to prevent this? Thanks for your help! _________________ DonationCoder.com brings AHK to the newbies!
Fan of AutoHotkey? Consider an occasional donation to its developer, Chris Mallett. |
|
| Back to top |
|
 |
tonne
Joined: 06 Jun 2006 Posts: 1158 Location: Denmark
|
Posted: Tue Jan 16, 2007 9:19 pm Post subject: |
|
|
Did you try using #IfWinActive?
There are good examples in the help file. _________________ there's a dog barking close within the range of my ear
sounds like he wants to escape the chain
he would probably bite me to death if he could
but the chain lets me spit in his face
- Kashmir |
|
| Back to top |
|
 |
Jaytech
Joined: 11 Dec 2006 Posts: 244 Location: Orlando, FL
|
Posted: Tue Jan 16, 2007 10:03 pm Post subject: |
|
|
Simplifing your script could help. Also, adding "SetBatchLines, -1" will speed up the script. Try this:
| Code: |
SetBatchLines, -1
#Persistent
SetTitleMatchMode, 3
#IfWinActive PROGRAM
$+i::
BlockInput On
Send {AppsKey}{Down 6}{Right}i
BlockInput Off
RETURN
|
Hope that helps  |
|
| Back to top |
|
 |
brotherS
Joined: 01 Jun 2005 Posts: 147
|
Posted: Wed Jan 17, 2007 10:26 am Post subject: |
|
|
Wow, thanks guys - such an easy solution I totally forgot about! After testing it and running into problems with other hotkeys (below this one in the script), I added another #IfWinActive at the end to turn it off again. Works perfectly now:
| Code: |
SetBatchLines, -1
#Persistent
SetTitleMatchMode, 3
#IfWinActive PROGRAM
$+i::
BlockInput On
Send {AppsKey}{Down 6}{Right}i
BlockInput Off
return
#IfWinActive
|
_________________ DonationCoder.com brings AHK to the newbies!
Fan of AutoHotkey? Consider an occasional donation to its developer, Chris Mallett. |
|
| Back to top |
|
 |
|