AutoHotkey Community

It is currently May 27th, 2012, 1:34 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: May 5th, 2009, 4:45 pm 
Hi, I just discovered that my compiled exe script works only in the same language OS that I wrote the script. For example, my Win vista is in spanish, I wrote my script in English, compiled it, it worked. Then I installed English Mui, I switched to engish and was surprised the comiled exe didn't work and gave me this error "Line 1 does not contain a recogized action"
When I switched back to spanih, the compiled script worked again.


What to do? Please help.

I can only save in ANSI format because UNICODE does not work for autohotkey. What should i do?

thank you


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 5th, 2009, 5:53 pm 
Show you script.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 5th, 2009, 6:26 pm 
Anonymous wrote:
Show you script.


any script, like:

#NoTrayIcon
^!t::send !{Esc}


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 6th, 2009, 2:55 pm 
It can be any script length, with only english letters. If i program it when spanish xp is on and then switch to english mui, the compiled exe does not work. Did noone have this problem?


Report this post
Top
  
Reply with quote  
PostPosted: May 6th, 2009, 3:18 pm 
Offline

Joined: October 22nd, 2008, 11:52 am
Posts: 85
Welcome wrote:
Hi, I just discovered that my compiled exe script works only in the same language OS that I wrote the script. For example, my Win vista is in spanish, I wrote my script in English, compiled it, it worked. Then I installed English Mui, I switched to engish and was surprised the comiled exe didn't work and gave me this error "Line 1 does not contain a recogized action"
When I switched back to spanih, the compiled script worked again.


What to do? Please help.

I can only save in ANSI format because UNICODE does not work for autohotkey. What should i do?

thank you





Dear Welcome, it looks like nobody knows, and neither do I.

Before compiling to .exe, save your .ahk in UTF-8 format ( Save As >Name>on the last dropdown box menu choose UTF-8 ).

Hope it'll help.

_________________
AutoHotKey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 6th, 2009, 4:17 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Sound logical to me, in English it is Alt-F for the File menu, in other languages the menu isn't called File but Archivo so the
shortcut to activate it may be Alt-A (for example). Try using different
methods such as send/postmessage this is independent of the language.

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 6th, 2009, 6:36 pm 
Offline

Joined: May 24th, 2007, 3:45 am
Posts: 1121
Who said anything about Alt+F?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 7th, 2009, 2:11 pm 
Offline

Joined: October 22nd, 2008, 11:52 am
Posts: 85
I understood that there was a problem with autohotkey not recognizing its scripts in different languages' evironments. If so, I'm sure it is worth saving .ahk's in UTF-8, which is superior to ANSII because it allows more characters. Would be good to hear from Welcome.

_________________
AutoHotKey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 7th, 2009, 9:44 pm 
Offline

Joined: May 24th, 2007, 3:45 am
Posts: 1121
It's worth a try, but by my understanding, AutoHotkey will parse it as ANSI anyway. Meaning you just get junk results if you try using non-ascii characters.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2009, 11:06 am 
Offline

Joined: October 22nd, 2008, 11:52 am
Posts: 85
ManaUser wrote:
It's worth a try, but by my understanding, AutoHotkey will parse it as ANSI anyway. Meaning you just get junk results if you try using non-ascii characters.



I think you're right, this sample illustrates that unfortunately neither ANSII nor UTF-8 allow many extended characters, even though you can see them fine in your notepad:

e.g. German ß ü ö ä

Code:
Sleep 3000
Send ßüöä

_________________
AutoHotKey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2009, 6:25 pm 
Offline

Joined: May 24th, 2007, 3:45 am
Posts: 1121
Actually those come through fine in ANSI, for me at least, but that may well depend on which language you're using. Specifically, the "code-page".

But none of this really explains why there would be any trouble with a very simple script like Welcome's example:
Code:
#NoTrayIcon
^!t::send !{Esc}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2009, 7:38 pm 
Offline

Joined: October 22nd, 2008, 11:52 am
Posts: 85
ManaUser wrote:
Actually those come through fine in ANSI, for me at least, but that may well depend on which language you're using. Specifically, the "code-page".

But none of this really explains why there would be any trouble with a very simple script like Welcome's example:
Code:
#NoTrayIcon
^!t::send !{Esc}



1. I get those german characters different when I save .ahk in ANSII or UTF-8. My OS is not German though. But I do see all the german letters fine when simply typing them in notepad.


2. According to Welcome:

Quote:
I wrote my script in English, compiled it, it worked. Then I installed English Mui, I switched to engish and was surprised the comiled exe didn't work and gave me this error "Line 1 does not contain a recogized action"
When I switched back to spanih, the compiled script worked again.


i.e. all works fine until he turns on a different MUI - ahk scripts just stop working then and pop up errors when run. So, this is not really caused by non-english symbols. As I understand.

_________________
AutoHotKey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 8th, 2009, 10:06 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
Workaround: try running AHK2EXE in Win98 compatibility - this might help.

Also make sure the script is actually being saved as ANSI rather than Unicode/UTF8 - try a different editor, if needed.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, chaosad and 15 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group