AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

is there a way to speed this up/prevent this?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
brotherS



Joined: 01 Jun 2005
Posts: 147

PostPosted: Tue Jan 16, 2007 9:13 pm    Post subject: is there a way to speed this up/prevent this? Reply with quote

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
View user's profile Send private message
tonne



Joined: 06 Jun 2006
Posts: 1158
Location: Denmark

PostPosted: Tue Jan 16, 2007 9:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jaytech



Joined: 11 Dec 2006
Posts: 244
Location: Orlando, FL

PostPosted: Tue Jan 16, 2007 10:03 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
brotherS



Joined: 01 Jun 2005
Posts: 147

PostPosted: Wed Jan 17, 2007 10:26 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group