Sign in to follow this  
Followers 0
madasraka

anyway to change any text language in autoit ?

13 posts in this topic

i am trying to make text in other language then English.

but when i type the text in scite all i see is ???????? and msgbox says the same.

How can i make text in other language ?

Share this post


Link to post
Share on other sites



Haven't done it myself but a quick check gives the following information:

Information about Unicode support in AutoIt can be found in the help file: AutoIt -> Using AutoIt -> Unicode Support.

SciTE has some Information in: SciTE documentation -> Paragraph: Encodings


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.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
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

You need to switch your input source .au3 to UTF-8 + BOM. Then you may enter whatever Unicode character you need. Be aware that the font you use in Scite will only display a limited range, but this is a cosmetic issue only.

There are a number of post related to this issue, which you'll find using the forum search feature.

Follow up if you still have problems.


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

Thank you so much. it works like a charm.

File/Encoding/UTF8 encoded with BOM in scite worked like a charm.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

One more detail: should you need to ConsoleWrite text containing characters not mapped in your ANSI setting, you can use the alternative below which will hapilly display Unicode text (again, limited to what the selected font allows):

Func _ConsoleWrite($sString)
    Local $aResult = DllCall("kernel32.dll", "int", "WideCharToMultiByte", "uint", 65001, "dword", 0, "wstr", $sString, "int", -1, _
                                "ptr", 0, "int", 0, "ptr", 0, "ptr", 0)
    If @error Then Return SetError(1, @error, 0)
    Local $tText = DllStructCreate("char[" & $aResult[0] & "]")
    $aResult = DllCall("Kernel32.dll", "int", "WideCharToMultiByte", "uint", 65001, "dword", 0, "wstr", $sString, "int", -1, _
                            "ptr", DllStructGetPtr($tText), "int", $aResult[0], "ptr", 0, "ptr", 0)
    If @error Then Return SetError(2, @error, 0)
    ConsoleWrite(DllStructGetData($tText, 1))
EndFunc
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

#6 ·  Posted (edited)

Oh no i dont know why or how this thing got saved when i was compiling it and every text turned into ???????? and i cant have to rewrite everything.

post-56898-0-12638600-1292659361_thumb.j

Edited by madasraka

Share this post


Link to post
Share on other sites

what do you mean by lang.ini ? and how do i add language support ?

Once i hit compile button changes are made instantly and file is saved.

I found that if i mark file as read only and then compile, it stays in language i need rather then jumping back to english.

Thanks but i need more info on your advice. :x

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

what do you mean by lang.ini ? and how do i add language support ?

Once i hit compile button changes are made instantly and file is saved.

I found that if i mark file as read only and then compile, it stays in language i need rather then jumping back to english.

Thanks but i need more info on your advice. :x

first thing download the file lang.rar extract the file in the same directory with the au3/exe file then CLICK :P

$Q = MsgBox(0x4, "", "Do you speak English?")
If $Q = 6 Then
    MsgBox(0, "", get_lang('EN'))
Else
    MsgBox(0, "", get_lang('AR'))
EndIf


Func get_lang($lang)
    $var = IniRead(@ScriptDir & "\lang.ini", $lang, "1", "NotFound")
    Return $var
EndFunc   ;==>get_lang

good luck

Edited by DCCD

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Its not helping

1st i thought i can compile if set script file to read only

Now thats not working no more

Right click/Compile (X86) works fine but icon is set to default autoit icon regardless of what "#AutoIt3Wrapper_icon=file.ico" says.

But it compiles it in language its written.

Right click/Compile will compile in X64 by default and i dont want that.

Right Click/Compile with options will open the file, change its encoding to default, save the file and then compile it with changed encoding thus screwing up the code.

I still need help.

I attached the file (project is not finished but functioning)

When compiled its all ????????????? unless i follow the step above which does not compile file with an icon i chose.

I guess wrapper needs some fixing (surgery).

Thanks. I hope issue gets resolved.

Bible Downloader.au3

Edited by madasraka

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

so then why if script compiled with Right click/Compile makes it look right and compiling it with options doesn't ?

If compiled without options then it does support it and it does work right. Its the "Compile with options" what makes it look like ??????? all over, not the compiler its self.

Edited by madasraka

Share this post


Link to post
Share on other sites

Oh never mind,"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe_x64.exe" does the job right without changing the script. :x

I wish right click Menu would bring up this compile options dialog instead of one it currently does. (which changes your script without even asking you about it :P )

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
Sign in to follow this  
Followers 0