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 

Extended ASCII characters in a control crashes AutoHotkey

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



Joined: 04 Oct 2006
Posts: 8

PostPosted: Mon Feb 18, 2008 2:01 am    Post subject: Extended ASCII characters in a control crashes AutoHotkey Reply with quote

I am using ControlGet to read the text in an Edit control in a window. It works just fine with standard ASCII characters, but some extended ASCII characters crash the script. Here is the offending line of code:

Code:
ControlGet, Artist, Line, 1, Edit2, MP4 info editor


The string in the Edit control that I am trying to read is: Mêlée

When AutoHotkey crashes, this is the error message generated by Windows:

Code:
AUTOHOTKEY caused a general protection fault
in module USER.EXE at 001e:00001ae0.
Registers:
EAX=00000000 CS=16df EIP=00001ae0 EFLGS=00000286
EBX=01470000 SS=699f ESP=000089c2 EBP=009b89c8
ECX=0000694d DS=6f76 ESI=00008000 FS=3557
EDX=00010000 ES=533f EDI=00028000 GS=0000
Bytes at CS:EIP:
f3 a4 5f 5e 1f ff 76 0a 9a dc 00 47 01 8b e5 5d
Stack dump:
7dd07de0 89de16bf 00011d1e 0000e94d 00006f76 1d04533f 7da87da8 220289f4 000117af 7de07dd0 8ae01d69 89fe7da8 8a0416bf 000121b0 0eec7da8 207b8a20


To me this seems like a bug, but perhaps there is a better way to read an Edit control in Win9x that doesn't cause the script to crash. Can anyone enlighten me?
Back to top
View user's profile Send private message
jaco0646



Joined: 07 Oct 2006
Posts: 559
Location: MN, USA

PostPosted: Mon Feb 18, 2008 3:11 am    Post subject: Reply with quote

Well, it's definitely a Win9x problem, as you noted, because the code works fine for me on XP.

Have you tried ControlGetText?
_________________
http://autohotkey.net/~jaco0646/
Back to top
View user's profile Send private message Visit poster's website
toasterking



Joined: 04 Oct 2006
Posts: 8

PostPosted: Tue Feb 19, 2008 6:03 am    Post subject: Reply with quote

Wow. I've been using AutoHotkey for a couple of years -- I don't know how I missed that. ControlGetText works beautifully in my scenario on Windows 98 -- thank you! Very Happy
Back to top
View user's profile Send private message
toasterking



Joined: 04 Oct 2006
Posts: 8

PostPosted: Tue Feb 19, 2008 6:16 am    Post subject: Reply with quote

I posted the bug:
http://www.autohotkey.com/forum/viewtopic.php?t=28800
Back to top
View user's profile Send private message
rickly
Guest





PostPosted: Tue Feb 19, 2008 11:30 am    Post subject: Re: Extended ASCII characters in a control crashes AutoHotke Reply with quote

toasterking wrote:
I am using ControlGet to read the text in an Edit control in a window. It works just fine with standard ASCII characters, but some extended ASCII characters crash the script. Here is the offending line of code:

Code:
ControlGet, Artist, Line, 1, Edit2, MP4 info editor


The string in the Edit control that I am trying to read is: Mêlée


I could not duplicate this on my win98se box.
saved and ran this as "test.ahk"
Code:
Gui, add, edit,w300 r3, this is my text: Mêlée
gui, show

then ran this
Code:
ControlGet, Artist, Line, 1, Edit1, test.ahk
msgbox, returned [%Artist%]
ExitApp

and it returned the expected text. Surprised
Back to top
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