Champak Posted June 30, 2006 Posted June 30, 2006 I want to set the path to a file and write it in an ini file. The way I want to do it is something like: $var = FileSelectFolder( "Choose a name.", "C:\", "(*)") IniWrite("Mix.ini", 'File', 'FilePath', $var) With that, once the folder is selected, the path automatically writes to the ini. I can't figure out how to do that with a regular .exe file. I've tried the FileSaveDialog and FileOpenDialog, but they don't seem to work; I can get the path to show if I throw up a message box, but the path wont write to the ini. Help please.
Xenobiologist Posted June 30, 2006 Posted June 30, 2006 (edited) Hi, look at the folder of the selected file. I has been discussed already, here :http://www.autoitscript.com/forum/index.php?showtopic=27623&hl= Try: $var = FileOpenDialog("Choose File", "c:\", "All (*.*)", 1+2) IniWrite(@ScriptDir & "\Mix.ini", 'File', 'FilePath', $var) So long, Mega Edited June 30, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Champak Posted July 1, 2006 Author Posted July 1, 2006 Thanks for the direction, however @scriptdir doesn't work, only the full path. But that helped me build a solution that solved my problem.
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