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 

My hotstrings have weird problems

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



Joined: 06 Dec 2007
Posts: 206

PostPosted: Sun Jul 20, 2008 2:58 am    Post subject: My hotstrings have weird problems Reply with quote

Hi
I've found out that the {Enter} key is not being recognized as a hotstring endchar. To ensure, I went to the help chm and found in the following:
Code:
#Hotstring EndChars -()[]{}:;'"/\,.?!`n `t

...and pasted it into my script. Still didn't work.

I put my script in my mum's notebook and tried, same problem. In there, I created a blank script and pasted only the beginning of my hotstrings section,
Code:
; ######################################################################################
; p5: HOTSTRINGS
######################################################################################

; À
::aa::à
:c*:aas::às
:c:Aas::Às

; ABOUT
:*:abotu::about
:*:abuot::about

; ABRAÇO!
:*:ab!::Abraço!!

; AÇÃO DIRETA DE INCONSTITUCIONALIDADE
::adi::ação direta de inconstitucionalidade


and then it worked. But in my main script, that is a little more complicated than the above, the Enter is non-functional, while all others are.
Why?

Thanks in advance!
_________________
AHK is perfect.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Sun Jul 20, 2008 3:34 am    Post subject: Reply with quote

are you using any Enter hotkeys elsewhere in your main script?

Try the top 50% of the script, does it work ok then?

keep cutting the script in half and you can quickly narrow down the problem.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Da Rossa



Joined: 06 Dec 2007
Posts: 206

PostPosted: Sun Jul 20, 2008 9:17 am    Post subject: Reply with quote

Engunneer you're the man! I found out that the culprit is this part:
Code:

; YAHOO BABELFISH TRANSLATION PORTUGUESE-ENGLISH
; ENTER, conditional
enter::
IfWinActive, Babel Fish,
{
   send {tab}{down 34}{tab}{enter}
}
Else
{
   send {enter}
}
return


So the exit is just to change the hotkey to that function from Enter to another one and I'm done? or is it a little more complicated, meaning that the problem is not in the Enter hotkey choice itself, but in the InWinActive?

One more little question: The hotstrings do not trigger at the beginning of a Msn messenger (WLM) message, inside the chat window. I have to hit a Space then the hotstring for it to work, and the message ends up with ugly indentation, otherwish it will only display the hotstring. Does this have a solution? Smile
_________________
AHK is perfect.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6847
Location: Pacific Northwest, US

PostPosted: Sun Jul 20, 2008 8:51 pm    Post subject: Reply with quote

you might be better off to script your enter this way:
Code:


; YAHOO BABELFISH TRANSLATION PORTUGUESE-ENGLISH
; ENTER, conditional
#IfWinActive, Babel Fish,
enter::
  send {tab}{down 34}{tab}{enter}
return
#IfWinActive

_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Da Rossa



Joined: 06 Dec 2007
Posts: 206

PostPosted: Mon Jul 21, 2008 12:41 am    Post subject: Reply with quote

Thanks Engun!! That worked perfectly. Glad to get help from you! Smile
_________________
AHK is perfect.
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