Sign in to follow this  
Followers 0
leuce

Variables don't get filled, unless in short script

4 posts in this topic

G'day everyone

I'm trying to fill one variable from two other variables. Those two variables are filled using IniReads. If I make a test script with just the variables in it, the script works fine:

$getjava1 = IniRead ("omtlauncher.ini", "JavaLocation", "javaloc", "ERROR")
$getjava2 = IniRead ("omtlauncher.ini", "OmegaTLocation", "omtloc", "ERROR")

$javarun = '"' & $getjava1 & '" -jar "' & $getjava2 & '"'

MsgBox (0, "Foo", $javarun, 10)

But if I put those *exact same lines of code* into my longer script, the variables don't get filled by IniRead and I get "ERROR" as variables instead.

See attached file with the INI file and the EXE script (drag and drop any file onto it to run the script).

Any ideas what can be wrong???

Thanks

Samuel

PS I don't think this has anything to do with IniRead, because I have had exactly the same problem with FileReadLine in previous trials.

Share this post


Link to post
Share on other sites



Its has everything to do with what directory you are "working" in. If you dont implicitly designate the paths you have then you are subject to be looking in the wrong place for your INI file.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

If you dont implicitly designate the paths you have then you are subject to be looking in the wrong place for your INI file.

Beautiful... this works, then:

(@ScriptDir & "\omtlauncher.ini",

Thanks a lot!

Share this post


Link to post
Share on other sites

Beautiful... this works, then:

(@ScriptDir & "\omtlauncher.ini",

Thanks a lot!

Not a problem. I learned that the hard way myself.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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  
Followers 0