lkjojfgfdg Posted January 12 Posted January 12 Hi there, I am trying to automate a GUI that seems to use UTF16, as ControlGetText returns values like "?&?N?e?x?t". If I compare to "?&?N?e?x?t" it does not work, because the return string does not actually use ?, it is only the replacement char for unprintable. Yes, I can get the list of controls, return the text for each and pick only every second byte/char for comparison, at least as long as I use ASCII letters only. Yes, it may be possible to build an UTF16 DllCall on GetControlTextWinstead of GetControlText which Autoits ControlGetText seems to use but is there a clean way in AutoIt to handle such GUIs? btw: if you run tidy on an .au3 with UTF16 (literals) it will be stuck in an infinite loop. Thanks
Developers Jos Posted January 12 Developers Posted January 12 41 minutes ago, lkjojfgfdg said: btw: if you run tidy on an .au3 with UTF16 (literals) it will be stuck in an infinite loop. Share a file that show this problem please,so I can test. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
lkjojfgfdg Posted January 12 Author Posted January 12 7 hours ago, Jos said: Share a file that show this problem please,so I can test. Sorry, my bad. I am no longer sure whether the issue does have to do with UTF16, as now even simple scripts do bring Tidy to infinite loop. Maybe there are some artefacts from the UTF16-Tidys that are not removed by an uninstall of autoit (cache files?) or something else is wrong with tidy on my system (as I did un- and reinstall and do still have this issue). It kind of looks like however as the reference is deleted on google drive and the tidy code is no longer in your signature I cannot test this. here is the (obviously incomplete) output of tidy. Maybe this should be splitted in two posts? (utf16 string handling and tidy infinite loop)? - sorry, i was sure it was related and it seems like I cannot edit the first post. log.txt
Developers Jos Posted January 12 Developers Posted January 12 I need the input script to test against the latest version of tidy as I see you are using an old version of tidy. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
lkjojfgfdg Posted January 13 Author Posted January 13 Why am I using an old version of tidy, given that I reinstalled using https://www.autoitscript.com/files/autoit3/autoit-v3-setup.zip ? Testscript is just ConsoleWrite("Hello")
Developers Jos Posted January 13 Developers Posted January 13 Because I haven't released an official new installer for a while, but development did continue. I believe there was an issue running that version fot the first time and believe I did update the installer but not sure I updated the zip file.... too long ago, The issue wast that some of the required tables are build initially at first start of tidy based on the autoit3 configfile present. Could it be it only shows a lot of debug message in the console the first time ran? If not i require a FILE to test with, not a cut & paste of the code, as the file contains the specific encoding! You could also simply download the lastest version of Tidy here and try that. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
jchd Posted January 13 Posted January 13 @lkjojfgfdg Windows has been natively supporting UTF16 since late XP. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
argumentum Posted January 13 Posted January 13 23 hours ago, lkjojfgfdg said: btw: if you run tidy on an .au3 with UTF16 (literals) it will be stuck in an infinite loop. Get the one from the beta folder. That does not occur with the newest version. 23 hours ago, lkjojfgfdg said: .. a GUI that seems to use UTF16.. ..but is there a clean way in AutoIt to handle such GUIs? I have no idea, but if you can share what is the program you're running, maybe someone has experience with that one. Or at least have a better idea of what's going on. Also, the OS language and keyboard in your setup ?. The more information you share, the better picture of what is going on we get. If you solved any of these, post the solution. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
lkjojfgfdg Posted Sunday at 07:03 AM Author Posted Sunday at 07:03 AM On 1/13/2026 at 10:49 AM, jchd said: @lkjojfgfdg Windows has been natively supporting UTF16 since late XP. That depends on the API that is used by Autoit- as I suggested that maybe GetControlText is used but only GetControlTextW is compatible with UTF16 according to Websearch.
lkjojfgfdg Posted Sunday at 07:05 AM Author Posted Sunday at 07:05 AM On 1/13/2026 at 9:47 AM, Jos said: Because I haven't released an official new installer for a while, but development did continue. [...] You could also simply download the lastest version of Tidy here and try that. newer version of Tidy fixes the issue. I did use the (zip download of the) bundled installer (Autoit+Scite+...)
jchd Posted Sunday at 10:24 AM Posted Sunday at 10:24 AM 3 hours ago, lkjojfgfdg said: That depends on the API that is used by Autoit Correct, but On 1/12/2026 at 1:04 PM, lkjojfgfdg said: I am trying to automate a GUI that seems to use UTF16 I meant that ALL (100%) of GUI components use UTF16-LE internally. BTW, AutoIt is somehow limited to UCS2. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now