Sign in to follow this  
Followers 0
butji

FileOpenDialog

6 posts in this topic




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

Share this post


Link to post
Share on other sites

yea but that doesnt work either and i would rather use filewriteline

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


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
Sign in to follow this  
Followers 0