Jump to content

Recommended Posts

Posted

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
Posted
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.
  :)

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

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.
  :)

Posted

@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 here
RegExp tutorial: enough to get started
PCRE 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)

Posted
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.
autoit_scripter_blue_userbar.png

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...