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 

Single key double function

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



Joined: 02 Jul 2004
Posts: 23

PostPosted: Fri Jul 02, 2004 3:03 pm    Post subject: Single key double function Reply with quote

I love autohotkey. Thanks so much for developing it.

I'm having a hard time wrapping my head around this concept: I want to use a single hotkey to toggle between two diffenent sends.

Any help would be appreciated.
Back to top
View user's profile Send private message
BaldieJr



Joined: 02 Jul 2004
Posts: 23

PostPosted: Fri Jul 02, 2004 3:39 pm    Post subject: Reply with quote

Well, it seems I can wrap my head around it after all.

I guess I got a case of the dummies because autohotkey is new to me.

Code:

+f::
if fpscounter = 0
{
   Send, Function 1 goes here {enter}
   fpscounter = 1
   return
}
else
{
   Send, Function 2 goes here {enter}
   fpscounter = 0
   return
}
Back to top
View user's profile Send private message
Beastmaster



Joined: 15 Apr 2004
Posts: 182

PostPosted: Fri Jul 02, 2004 8:30 pm    Post subject: Reply with quote

Quote:
f12::
if fpscounter = 0
{
Send, Function 1 goes here {enter}
fpscounter = 1
}
else
{
Send, Function 2 goes here {enter}
fpscounter = 0
}



-----

That worked fine with me ( ! changed the Hotkey for testing)
Back to top
View user's profile Send private message
BaldieJr



Joined: 02 Jul 2004
Posts: 23

PostPosted: Mon Jul 05, 2004 1:50 am    Post subject: Reply with quote

I tried it without the returns and found that without them, the next hotkey in the script gets fired also. With the returns left in, it functions normally.

Long story short: if you do something like this, make sure you put a return at the ends of each command set.
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