mariasx Posted August 3, 2004 Posted August 3, 2004 I would like to ask how to force AutoIT work with special codepage. I working with Clipboard. Before executing script Clipboard contain: ľčťňôďĽČŤŇĎ. After executing script contain:¾èòôï¼ÈÒÏthe script is:$cleared = ClipGet() ClipPut ( $cleared )
emmanuel Posted August 3, 2004 Posted August 3, 2004 even odder for me, coppied your "before" sample ľčťňôďĽČŤŇĎ then ran this code:$cleared = ClipGet() MsgBox(4096,'debug:' , '$cleared:' & $cleared);### Debug MSGBOX ClipPut ( $cleared ) $next = ClipGet() MsgBox(4096,'debug:' , '$next:' & $next);### Debug MSGBOXThis shows up in both msgboxes... l(c(t(n(ôd(L(C(T(N(D( and is in the clipboard in the end. maybe some sort of asc or chr parsing needs to be done? "I'm not even supposed to be here today!" -Dante (Hicks)
pekster Posted August 3, 2004 Posted August 3, 2004 Even stranger: try pasting in that string of chars into this script's input box: $a = InputBox('title', 'prompt') For $i = 1 To StringLen($a) MsgBox(0, "", "Char " & $i & ": " & Asc(StringMid($a, $i, 1))) Next How's that for odd? [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
emmanuel Posted August 3, 2004 Posted August 3, 2004 pekster said: Even stranger: try pasting in that string of chars into this script's input box: $a = InputBox('title', 'prompt') For $i = 1 To StringLen($a) MsgBox(0, "", "Char " & $i & ": " & Asc(StringMid($a, $i, 1))) Next How's that for odd? <{POST_SNAPBACK}>it pasted into the input box fine for me, then started returning the asc for the chars... what oddity happened for you? "I'm not even supposed to be here today!" -Dante (Hicks)
pekster Posted August 3, 2004 Posted August 3, 2004 emmanuel said: it pasted into the input box fine for me, then started returning the asc for the chars... what oddity happened for you? <{POST_SNAPBACK}>No, look up the ASCII letters that the code represents. You end up with the following string after re-creating the letters: lctnônLCTND That's a lower-case L for the first letter, not an I or 1. The strangeness is in the fact that it not only didn't match the original, but also didn't match what you got as a result when you ran your test. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
emmanuel Posted August 3, 2004 Posted August 3, 2004 pekster said: No, look up the ASCII letters that the code represents. You end up with the following string after re-creating the letters: lctnônLCTND That's a lower-case L for the first letter, not an I or 1. The strangeness is in the fact that it not only didn't match the original, but also didn't match what you got as a result when you ran your test. <{POST_SNAPBACK}>well, my, yes, that's odd. What are those special characters doing to autoit? when I paste ľčťňôďĽČŤŇĎ into SciTE I get l(c(t(n(ôd(L(C(T(N(D( when I paste into other apps, it's the same as it goes in... This is beyond me. "I'm not even supposed to be here today!" -Dante (Hicks)
mariasx Posted August 4, 2004 Author Posted August 4, 2004 pekster said: Even stranger: try pasting in that string of chars into this script's input box: $a = InputBox('title', 'prompt') For $i = 1 To StringLen($a) MsgBox(0, "", "Char " & $i & ": " & Asc(StringMid($a, $i, 1))) Next How's that for odd? <{POST_SNAPBACK}>thanks for ansver, but it should work with strings much longer and also containing EOL. So if U paste that into the Input Box, after first EOL string will be truncated
pekster Posted August 4, 2004 Posted August 4, 2004 mariasx said: thanks for ansver, but it should work with strings much longer and also containing EOL. So if U paste that into the Input Box, after first EOL string will be truncated <{POST_SNAPBACK}>End Of Line? The CR and LF characters work fine inside a message box. It's only null characters that will terminate a string early since AutoIt stores all data as a variant. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
mariasx Posted August 9, 2004 Author Posted August 9, 2004 pekster said: End Of Line? The CR and LF characters work fine inside a message box. It's only null characters that will terminate a string early since AutoIt stores all data as a variant. <{POST_SNAPBACK}>Hmm. Anyway, I want to work with Clipboard, because it speed up my work. Thats why is InputBox unefficient for me. I try to work with ASCII code, but it didn't work too.
pekster Posted August 9, 2004 Posted August 9, 2004 (edited) mariasx said: I try to work with ASCII code, but it didn't work too. <{POST_SNAPBACK}>Could you be dealing with Unicode? That uses 2 bytes per character instead of one, so reading it as a line into an AutoIt string varialbe would likely produce very odd results. If so, you could try to save it as plaintext. Minor edit Edited August 9, 2004 by pekster [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
mariasx Posted August 11, 2004 Author Posted August 11, 2004 pekster said: Could you be dealing with Unicode? That uses 2 bytes per character instead of one, so reading it as a line into an AutoIt string varialbe would likely produce very odd results. If so, you could try to save it as plaintext. Minor edit <{POST_SNAPBACK}>But how? only I could change is input language: Aplication is the same: Notepad.: 1. CUT text from Notepad 2. Runing AutoIT script(with defined HOTKEY) 3. PASTE text back to Notepad How could I switch to Unicode?
pekster Posted August 12, 2004 Posted August 12, 2004 mariasx said: How could I switch to Unicode? <{POST_SNAPBACK}>No, if you start with unicode characters, and try to have AutoIt process them, you will get strange results. I don't think AutoIt is set up to handle unicode strings properly. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.
Lazycat Posted August 12, 2004 Posted August 12, 2004 This is a very old problem I'm also have trouble with it, and this is not only Autoit related. Don't sure that real solution possible until Autoit will handle Unicode.BTW Slovak is default keyboard language in your system? In some cases this can solve problem. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s])
Administrators Jon Posted August 12, 2004 Administrators Posted August 12, 2004 AutoIt only uses ANSI, mainly because it needs to be small and work with Windows 9x system that can't support unicode without add-ons and large amounts of code. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
mariasx Posted August 20, 2004 Author Posted August 20, 2004 (edited) Kot said: This is a very old problem I'm also have trouble with it, and this is not only Autoit related. Don't sure that real solution possible until Autoit will handle Unicode. BTW Slovak is default keyboard language in your system? In some cases this can solve problem. <{POST_SNAPBACK}>No, default language is English, I need Slovak language to work(create/edit) with DOCs. First idea of creating this script, was to CLEAN HTML SOURCE from empty tags like: <b></b> , <p> </p>....every other CHARacter(including č ť ....) should be intact. Edited August 20, 2004 by mariasx
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