butji Posted June 16, 2007 Share Posted June 16, 2007 how come this work $message = "Choose game exe" $path2 = FileOpenDialog($message, @ProgramFilesDir & "\", "All (*.*)", 1 + 4) msgbox( 1, "", $path2 ) Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 16, 2007 Share Posted June 16, 2007 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 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
butji Posted June 16, 2007 Author Share Posted June 16, 2007 yea but that doesnt work either and i would rather use filewriteline Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted June 16, 2007 Share Posted June 16, 2007 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 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 16, 2007 Share Posted June 16, 2007 (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) Edited June 16, 2007 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 More sharing options...
Mast3rpyr0 Posted June 16, 2007 Share Posted June 16, 2007 i think that the program i made is what your trying to do. look through my code if you get stuck. Link's in my sig. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now