fbk Posted September 14, 2007 Share Posted September 14, 2007 (edited) Hi. I have a problem: I want to get a code from a txt, ini or other file, but the program use as string. I did test some variable, but doesn't work... Thanx for help and sorry for my english. CODE If $CmdLine[0]=0 Then If FileExists(@ScriptDir & "\" & "options.ini")=0 Then ConsoleWrite( ip() & @CRLF & submask() ) filewrite($info, ip() & @CRLF & submask() ) Else $opt=StringToBinary(IniRead(@ScriptDir & "\" & " options.ini","options","format","na")) ConsoleWrite($opt) filewrite($info, $opt) EndIf Else If $CmdLine[1]="ip" Then ConsoleWrite( ip()) filewrite($info, ip()) ElseIf $CmdLine[1]="submask" Then ConsoleWrite( submask()) filewrite($info, submask()) Else ConsoleWrite("Érvénytelen paraméter!") filewrite($info, "Érvénytelen paraméter!") EndIf EndIf Edited September 14, 2007 by fbk Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 14, 2007 Share Posted September 14, 2007 You didn't say what you wanted the "code" to be. If StringToBinary() isn't getting it, what did you want the string converted to? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
fbk Posted September 14, 2007 Author Share Posted September 14, 2007 (edited) You didn't say what you wanted the "code" to be. If StringToBinary() isn't getting it, what did you want the string converted to? CODE[options] format="IP: "ip() It's the ini file... Edited September 14, 2007 by fbk Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 14, 2007 Share Posted September 14, 2007 CODE[options] format="IP: "ip() It's the ini file... You mean you want to put the literal AutoIt function call in the ini file? I guess you could try Call($opt)... seems like an awfully crunchy way to do things, though... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
fbk Posted September 14, 2007 Author Share Posted September 14, 2007 You mean you want to put the literal AutoIt function call in the ini file? I guess you could try Call($opt)... seems like an awfully crunchy way to do things, though... It doesn't work. The return value: 0 Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 14, 2007 Share Posted September 14, 2007 It doesn't work. The return value: 0I give up... my crystal ball isn't working here... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
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