Jump to content

FileOpenDialog


Recommended Posts

there is another way to write to ini files. INIwrite()

$message = "Choose game exe"
$path2 = FileOpenDialog($message, @ProgramFilesDir & "\", "All (*.*)", 1 + 4)
IniWrite("games.ini", "games", "1", $path2)

your INI would be:

[games]
1=PathFromProgram
Link to comment
Share on other sites

if its an ini dont use filewriteline, it wont let you use the ini correctly if you dont. be sure you have a games.ini with

[games]

1=

already in it and in the same folder as your script

Link to comment
Share on other sites

Are you sure it's NOT working? When FileOpenDialog() is done, the directory of the file selected becomes the working directory. Since you didn't provide a path for "games.ini" it will be created\written in the same folder as the selected file, not the script directory.

$message = "Choose game exe"
MsgBox(64, "Debug (before)", "@WorkingDir = " & @WorkingDir & @LF)
$path2 = FileOpenDialog($message, @ProgramFilesDir & "\", "All (*.*)", 1 + 4)
MsgBox(64, "Debug (after)", "$path2 = " & $path2 & @CRLF & _
        "@WorkingDir = " & @WorkingDir)

:rolleyes:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...