Jump to content
Sign in to follow this  
Champak

Issues with file path and ini

Recommended Posts

Champak

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.

Share this post


Link to post
Share on other sites
Xenobiologist

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 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

Share this post


Link to post
Share on other sites
Champak

Thanks for the direction, however @scriptdir doesn't work, only the full path. But that helped me build a solution that solved my problem.

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  

×