leuce Posted August 1, 2006 Share Posted August 1, 2006 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. Link to comment Share on other sites More sharing options...
JSThePatriot Posted August 1, 2006 Share Posted August 1, 2006 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) Link to comment Share on other sites More sharing options...
leuce Posted August 1, 2006 Author Share Posted August 1, 2006 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! Link to comment Share on other sites More sharing options...
JSThePatriot Posted August 1, 2006 Share Posted August 1, 2006 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) 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