DRC

Does AUTOIT support Chineese language?

12 posts in this topic

I have been trying to run a application which UI contains Chinese language but not able to record anything. AUTOIT is unable to generate the script when I run record and play method. I am attaching one script example of the application which AUTOIT recorded. Please let me know if AUTOIT support any application with Chinese language UI and if yes then how. Please help.

sample add patient.au3

sample add patient.exe

Share this post


Link to post
Share on other sites



Welcome to AutoIt and the forum!

Using AutoIt recorder does not lead to very reliable scripts. The recorded script uses Send etc. which depends on the screen resolution, window position etc.
I suggest to write the script from scratch and use Ctrl* functions.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2016-08-18 - Version 1.4.6.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2016-12-04 - Version 1.2.2.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Could you please help me out how to write the script in AutoIT which supports an application made of Chinese language UI. Also is there any tutorial available I can refer to write the script.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Set your source file(s) to UTF8 encoding and write your application as if literals and string variables were english. English, French, Khmer, Chinese or Klingon doesn't make a difference. Just one thing to take care of: AutoIt currently uses the UCS2 charset, which is the restriction of Unicode to its BMP (Basic Multi-language Plane or plane 0) by using only one 16-bit encoding unit per UCS2 character. That means you can't use some string-related functions reliably if you intend to use Han characters located in the SIP (Supplementary Ideographic Plane) which uses Unicode plane 2 (requiring 2 16-bit encoding units per character).

And, as water said, keep away from Recorder.

Edited by jchd

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)

Share this post


Link to post
Share on other sites

Hi thank you for your valuable comment. Could you please tell me where I will get this source file to change it to UTF8 .I have downloaded autoit-v3.3.14.0. Also could you please provide me a tutorial to refer to write the script. Please help.

Share this post


Link to post
Share on other sites

Install SciTE4AutoIt3 to enjoy many tools.

In menu to set open .au3 file to UTF8: File > Encoding > UTF8

For permanent change of source and console encoding add/change this in SciTEUser.properties:

code.page=65001
output.code.page=65001
#NewFileEncoding=CodePage/UTF8/UTF8BOM/UTF16BE/UTF16LE
NewFileEncoding=UTF8
utf8.auto.check=4

 

 


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)

Share this post


Link to post
Share on other sites

Just for the record: any new file will be UTF8 w/o BOM encoded by default since the last couple of releases.
This is the same for existing scriptfiles unless a special ASCII character or BOM is detected in the source.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Jos,

I wild guessed that the OP is using one of the 2-byte asian codepage, like Big5, GB*, Shift-JIS or the like, so his existing sources are likely being easily misinterpreted.


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)

Share this post


Link to post
Share on other sites

Understood and indeed needs the proper codepage set in the SciTEUser.propertieslike you mentioned.
My statement was just about the last 2 keywords: 

NewFileEncoding=UTF8
utf8.auto.check=4

Jos 


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#10 ·  Posted

You're right, I overlooked that he said having installed the latest release. I promise to try hard not doing it again, Lord o:)

1 person likes this

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)

Share this post


Link to post
Share on other sites

Hi Thank you all for your valuable comment. Could you please help me out to get a manual to refer to write the script for AutoIT. I really need to write the script from scratch and not sure how to start. Please help.

Share this post


Link to post
Share on other sites

Hi @DRC, There is a dedicated page on AutoIt wiki called "Tutorials". You might find valuable resources there :).

I would personally recommend @Morthawt's youtube tutorials:

Good luck, TD :D


Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites

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