Jump to content

Recommended Posts

Posted (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 by fbk
Posted (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 by fbk
Posted

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
Posted

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

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
  • Recently Browsing   0 members

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