Jump to content

automaticly locate an .ini file


Recommended Posts

; Look for an .ini file as scriptexename.ini:

$iniFileName=stringleft(@ScriptFullPath,stringinstr(@ScriptFullPath,".",0,-1)) & "ini"

; Alternatively, look for an .ini file in the same folder as the executable, but with a different name:

$iniFileName=pathonly(@ScriptFullPath) & "yourinifile.ini"

func pathonly ($pathtostrip)
If stringinstr($pathtostrip,"\") =0 then
 $pathtostrip = $pathtostrip & "\"
endif
return stringleft($pathtostrip,stringinstr($pathtostrip,"\",0,-1))
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...