Jump to content
Sign in to follow this  
butji

FileOpenDialog

Recommended Posts

Mast3rpyr0

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
butji

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

Share this post


Link to post
Share on other sites
Mast3rpyr0

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

Share this post


Link to post
Share on other sites
PsaltyDS

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  

×