Jump to content
Sign in to follow this  

BrainStorm in COMSPEC !

Recommended Posts


Hello people. Have big problem, and CAN'T solve it by myself...

5 hours tryed to solve this problem, searched in all AutoitHelp Files and didn't find nothing.

Made many experiments and still nothing... I giveup...

Need YOUR HELP! Please!

I'm Russian and using RUS Win XP SP2 | Charset Windows Cyrilic 1251 & 20880 IBM Cyrilic (Are installed too) :(

When runing simple batch script like:

@echo off
cmd /c somefile.exe /somekey:МозговойШтурм /someotherparrameters >C:\hz.txt 
REM or even: somefile.exe /somekey:МозговойШтурм /someotherparrameters >C:\hz.txt 
REM or even!!!: command.com /c somefile.exe /somekey:МозговойШтурм /someotherparrameters >C:\hz.txt

ALL WORKS FINE, and my russian string "МозговойШтурм"

works with program that i start...

But when i'm runing it from autoit like:

RunWait(@ComSpec & " /c somefile.exe /somekey:МозговойШтурм /someotherparrameters  >C:\hz.txt", "", @SW_HIDE)
OR EVEN RunWait("cmd /c somefile.exe /somekey:МозговойШтурм /someotherparrameters  >C:\hz.txt", "", @SW_HIDE)

Program did not get that key "/somekey: ..." - it returns chars in other charset or don't know how to explain ( let's say not Russian String ;)

So after (5 hours of) Brain-Storm and many experiments, I think that the problem is in AUTOIT... ! :3

(maybe it using it's own shell or maybe just does't support that charset, don't know) Just got that in command shell works fine,

but not in autoit...

So here is clearly question - How to send russian strings trough autoit shell (i mean something like):

RunWait(@ComSpec & " /c echo В РОТ МНЕ НОГИ >C:\done.txt", "", @SW_HIDE)

In normal, readible TEXT (charset)

p.s: Can't finish my project without solving this problem ^_^

p.p.s: For laugh (some sources from my great experiments):

Func filter($stroka)  
;Мегакруто переводит Стандартную кодировку в Досовскую | Сам придумал =) НИХУЯ НЕ ПАШЕТ ГОВНО !!! ))
;Придумал другую - ниже ))
Local $startfilter = Run(@ComSpec & " /c " & "echo " & $stroka, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
While 1
Local $filtered = StdoutRead($startfilter)
If @error Then ExitLoop
If $filtered <> "" then return StringReplace($filtered, @CRLF, "")
GUICtrlSetFont($TEXT, 8, 400, 0, "Terminal") ;КРУЧУ, ВЕРЧУ - НАЕБУ
GUICtrlSetFont($WHERE, 8, 400, 0, "Terminal")
GUICtrlSetFont($TEXT, 8, 400, 0, "MS Sans Serif")  ;НАЕБАЛ =)) Проверил, ОПЯТЬ не то бля (((
GUICtrlSetFont($WHERE, 8, 400, 0, "MS Sans Serif")

[RU] Zone

Share this post

Link to post
Share on other sites

Did you try saving your script file in UTF-16 with a BOM?

Share this post

Link to post
Share on other sites

No... But I think this will not solve the problem but Ail try

[RU] Zone

Share this post

Link to post
Share on other sites

; working code....

RunWait(@ComSpec & ' /k echo This is a test >C:\done.txt'); use this "k" to see any errors



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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.