Jump to content

Recommended Posts

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 post
Share on other sites

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)

NEWHeader1.png

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