Jeanpierre92 Posted April 2, 2010 Share Posted April 2, 2010 (edited) I have a question and I cant find the awnser. Here you see a part of my script, you must select a file and then a part of the path will be replaced by: SroTool.ini And then the SroTool.ini file will be saved in the map where you have selected the file: hook.exe from. Normally I put the file here: "C:\Windows\config.ini" but not everyone have this map. So my problem is: If I open the tool at another time how must I let the script know where the SroTool.ini file is? If there isn't a solution for it, maby someone can reply another good solution to solve the problem in some kind of way? Here is a part of my working script: Func selecthookButton() $bericht = "Select the hook.exe file" $pad = FileOpenDialog($bericht, @WindowsDir & "\", "Hook (*.exe;)", 1 + 4 ) $configfile = StringReplace($pad, "Hook.exe", "SroTool.ini") IniWrite($configfile, "Filepaths", "Hook.exe", $pad) GUICtrlSetData($padhook, $pad) EndFunc Thanks, Jeanpierre Edited April 2, 2010 by Jeanpierre92 Link to comment Share on other sites More sharing options...
jvanegmond Posted April 2, 2010 Share Posted April 2, 2010 You can use relative paths for the ini file, or store it in application directory (@AppDataDir) where it's supposed to go.If you want to put the ini in the same directory as in, then don't specify a path at all: IniWrite("SroTool.ini", ... etc github.com/jvanegmond Link to comment Share on other sites More sharing options...
Jeanpierre92 Posted April 4, 2010 Author Share Posted April 4, 2010 Thanks Now it works 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