craigholohan Posted April 19, 2007 Share Posted April 19, 2007 Hi Guys and Gals, I have a quick question, I know there is a simple answer but I have been struggling all day :"> I have a simlpe INI file with 2 Key values and I need to call them together. See below: Global $readPath = IniRead(@ScriptDir & "\fileLocation.ini", "File Location", "Path", $fileLocation) Global $readfile = IniRead(@scriptDir & "\fileLocation.ini", "File Location", "fileName", $fileLocation) Global $filename = $readPath\$readfile the $filename is what I want to read, so in efect I need to put the $readPath and $readfile together. Hope this is a good enough explanation. Thanks in advance for any help. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 19, 2007 Developers Share Posted April 19, 2007 $readPath & "\" & $readfile SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
craigholohan Posted April 19, 2007 Author Share Posted April 19, 2007 $readPath & "\" & $readfile Thanks JdeB, I did try that before but it still does not seem to work. Below is whats in my ini file: [File Location] Path=C:\Micros BootP Config\ [File Name] fileName=bootptab and what I need it to return is C:\Micros BootP Config\bootptab If I type: $filename = C:\Micros BootP Config\bootptab my script works the way I want it to, also if I just have one entry in my INI file like: [File Location] Path=C:\Micros BootP Config\bootptab then use: Global $filename = IniRead(@scriptDir & "\fileLocation.ini", "File Location", "Path", $fileLocation) it also works but in another part of the app I only need the path and not the file name that is why I need to do it the hard way around. Link to comment Share on other sites More sharing options...
craigholohan Posted April 19, 2007 Author Share Posted April 19, 2007 Dont worry I fond my mistake -- Marked in redGlobal $readPath = IniRead(@ScriptDir & "\fileLocation.ini", "File Location", "Path", $fileLocation)Global $readfile = IniRead(@scriptDir & "\fileLocation.ini", "File Name", "fileName", $fileLocation)Sorry to be so silly but thanks anyway. 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