| View previous topic :: View next topic |
| Author |
Message |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Mon Jul 23, 2007 10:07 am Post subject: use space as hotkey |
|
|
Hello. I am using the utility "LetMeType" which autocompletes text. The matching word has the shortcut "1" next to it, so if i press 1 the word will be completed automatically.
But if I use the space (in the autohotkey ini file) as a shortcut to send 1 in the letmetype window, I cannot anymore use the space as hotkey in any other application (like to launch find and run robot with each default shortcut alt+space) and also I cannot use the space as a ending character in autohotkey text replacements.
The script that I am using is:
| Code: | $*space::
ifwinexist LetMeType:
{
send 1
}
else
{
send {space}
}
return |
Is there a way to overcome this?
Thanks |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Mon Jul 23, 2007 11:37 am Post subject: |
|
|
| Use #IfWinExist instead of IfWinExist (directive vs. command) |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Mon Jul 23, 2007 12:40 pm Post subject: |
|
|
Thanks but it isn't working.
I am looking to assign the space key to 1 when the window "LetMeType:" is visible and in all other cases the space to act as normal. |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Mon Jul 23, 2007 1:09 pm Post subject: |
|
|
| Babis wrote: | | Thanks but it isn't working. | So show us your new script, so we can look what is wrong...  |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Mon Jul 23, 2007 2:08 pm Post subject: |
|
|
It gives me the error:
| Code: | | Error: ELSE with no matching IF |
I was trying script something like this
but I cant'. |
|
| Back to top |
|
 |
Helpy Guest
|
Posted: Mon Jul 23, 2007 5:21 pm Post subject: |
|
|
So show us your new script, so we can look what is wrong...
And double check the syntax of #IfWinExist, it has no Else, and must be before the hotkey. |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Tue Jul 24, 2007 8:16 am Post subject: |
|
|
| Helpy wrote: | So show us your new script, so we can look what is wrong...
And double check the syntax of #IfWinExist, it has no Else, and must be before the hotkey. |
Thanks now working with your clarification, I didn't know I had to put the #ifwinexist before the hotkey |
|
| Back to top |
|
 |
Grumpy Guest
|
Posted: Tue Jul 24, 2007 1:35 pm Post subject: |
|
|
| AHK's Manual wrote: | | The #IfWin directives are positional: they affect all hotkeys and hotstrings physically beneath them in the script. | Plus the numerous examples...  |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Tue Jul 24, 2007 4:08 pm Post subject: |
|
|
What do you mean?  |
|
| Back to top |
|
 |
Grumpy Guest
|
Posted: Tue Jul 24, 2007 4:45 pm Post subject: |
|
|
Just that you made we wondering if the manual missed a point.
So I just show that the information you "didn't know" what just there.
^_^ |
|
| Back to top |
|
 |
Babis
Joined: 08 Dec 2005 Posts: 45
|
Posted: Wed Jul 25, 2007 9:14 am Post subject: |
|
|
| Thanks. To tell you the truth I read the manual when I first installed the autohotkey and since then only consulting occasionally. |
|
| Back to top |
|
 |
|