Jump to content

Recommended Posts

Posted

if someplace in a scrpit calls for an iniread or iniwrite whats is the way to tell the script that the ini is located in the same dir as the script?

<{POST_SNAPBACK}>

Check the help file, there's an easy way to find the script dir (hint: @)
Posted

; 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))

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...