Jump to content

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
cls
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
Exit

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, "")
Wend
EndFunc
==============
GUICtrlSetFont($TEXT, 8, 400, 0, "Terminal") ;КРУЧУ, ВЕРЧУ - НАЕБУ
GUICtrlSetFont($WHERE, 8, 400, 0, "Terminal")
$XDATA = GUICtrlRead($TEXT)
$MASK = GUICtrlRead($MASKX)
$INTO = GUICtrlRead($WHERE)
GUICtrlSetFont($TEXT, 8, 400, 0, "MS Sans Serif")  ;НАЕБАЛ =)) Проверил, ОПЯТЬ не то бля (((
GUICtrlSetFont($WHERE, 8, 400, 0, "MS Sans Serif")
[RU] Zone
Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...