Mack Posted August 18, 2005 Posted August 18, 2005 I finally did it, created my own ini read script, But then the power turned off and nothing was saved as i changed some things in the script. $par = IniReadSection("settings.ini", "section1") If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Else For $i = 1 To $par[0][0] MsgBox(4096, "", "Key: " & $par[$i][0] & @CRLF & "Value: " & $par[$i][1]) run("explorer.exe" " & ," "$par[$i][1]") Next EndIf I want explorer to run the directory set in the ini section1, so can someone fix this script?
Valuater Posted August 18, 2005 Posted August 18, 2005 you should have found your "error" with the "syntax check" in sciTE. also, i replaced "run" with "runwait" ... this will wait for you to close the existing explorer before opening a new one $par = IniReadSection("settings.ini", "section1") If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Else For $i = 1 To $par[0][0] MsgBox(4096, "", "Key: " & $par[$i][0] & @CRLF & "Value: " & $par[$i][1]) RunWait("explorer.exe " & "$par[$i][1]") Next EndIf *********** not tested *********** hope that helps 8)
Valuater Posted August 18, 2005 Posted August 18, 2005 Also... note that the first charactor of $par[$i][1] needs to be a "\" or... you may need a "\" added to your run script (not sure ).. like this Run("explorer.exe " & @HomeDrive & "\", "", @SW_MAXIMIZE) 8)
Valuater Posted August 18, 2005 Posted August 18, 2005 Give me one example of $par[$i][1] $par[$i][1] = ???????? 8)
Mack Posted August 18, 2005 Author Posted August 18, 2005 Well it does work now: Run("explorer.exe " & $par[$i][1] & "\", "", @SW_MAXIMIZE) $par[$i][1] = C:\Test\Test
Valuater Posted August 18, 2005 Posted August 18, 2005 Good 8) I knew it should, glad i could help 8)
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