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 

use space as hotkey

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



Joined: 08 Dec 2005
Posts: 45

PostPosted: Mon Jul 23, 2007 10:07 am    Post subject: use space as hotkey Reply with quote

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





PostPosted: Mon Jul 23, 2007 11:37 am    Post subject: Reply with quote

Use #IfWinExist instead of IfWinExist (directive vs. command)
Back to top
Babis



Joined: 08 Dec 2005
Posts: 45

PostPosted: Mon Jul 23, 2007 12:40 pm    Post subject: Reply with quote

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





PostPosted: Mon Jul 23, 2007 1:09 pm    Post subject: Reply with quote

Babis wrote:
Thanks but it isn't working.
So show us your new script, so we can look what is wrong... Smile
Back to top
Babis



Joined: 08 Dec 2005
Posts: 45

PostPosted: Mon Jul 23, 2007 2:08 pm    Post subject: Reply with quote

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





PostPosted: Mon Jul 23, 2007 5:21 pm    Post subject: Reply with quote

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

PostPosted: Tue Jul 24, 2007 8:16 am    Post subject: Reply with quote

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





PostPosted: Tue Jul 24, 2007 1:35 pm    Post subject: Reply with quote

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... Razz
Back to top
Babis



Joined: 08 Dec 2005
Posts: 45

PostPosted: Tue Jul 24, 2007 4:08 pm    Post subject: Reply with quote

What do you mean? Confused
Back to top
View user's profile Send private message
Grumpy
Guest





PostPosted: Tue Jul 24, 2007 4:45 pm    Post subject: Reply with quote

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

PostPosted: Wed Jul 25, 2007 9:14 am    Post subject: Reply with quote

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
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