| View previous topic :: View next topic |
| Author |
Message |
BaldieJr
Joined: 02 Jul 2004 Posts: 23
|
Posted: Fri Jul 02, 2004 3:03 pm Post subject: Single key double function |
|
|
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 |
|
 |
BaldieJr
Joined: 02 Jul 2004 Posts: 23
|
Posted: Fri Jul 02, 2004 3:39 pm Post subject: |
|
|
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 |
|
 |
Beastmaster
Joined: 15 Apr 2004 Posts: 182
|
Posted: Fri Jul 02, 2004 8:30 pm Post subject: |
|
|
| 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 |
|
 |
BaldieJr
Joined: 02 Jul 2004 Posts: 23
|
Posted: Mon Jul 05, 2004 1:50 am Post subject: |
|
|
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 |
|
 |
|