Jump to content

Recommended Posts

Posted

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?

Posted

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

Posted

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)

NEWHeader1.png

Posted

Well it does work now:

Run("explorer.exe " & $par[$i][1] & "\", "", @SW_MAXIMIZE)

$par[$i][1] = C:\Test\Test

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