Mack Posted August 18, 2005 Share 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? Link to comment Share on other sites More sharing options...
Valuater Posted August 18, 2005 Share 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) Link to comment Share on other sites More sharing options...
Valuater Posted August 18, 2005 Share 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) Link to comment Share on other sites More sharing options...
Mack Posted August 18, 2005 Author Share Posted August 18, 2005 Gonna test it when i come home. Link to comment Share on other sites More sharing options...
Mack Posted August 18, 2005 Author Share Posted August 18, 2005 Script doesn't work. Link to comment Share on other sites More sharing options...
Mack Posted August 18, 2005 Author Share Posted August 18, 2005 It does now Link to comment Share on other sites More sharing options...
Valuater Posted August 18, 2005 Share Posted August 18, 2005 Give me one example of $par[$i][1] $par[$i][1] = ???????? 8) Link to comment Share on other sites More sharing options...
Mack Posted August 18, 2005 Author Share Posted August 18, 2005 Well it does work now: Run("explorer.exe " & $par[$i][1] & "\", "", @SW_MAXIMIZE) $par[$i][1] = C:\Test\Test Link to comment Share on other sites More sharing options...
Valuater Posted August 18, 2005 Share Posted August 18, 2005 Good 8) I knew it should, glad i could help 8) 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