CZorg Posted June 10, 2010 Share Posted June 10, 2010 (edited) I've searched the forums about this but didn't find anything like this. I'm creating a config app for another app I've made and here's the code that's been messing Case $btn_Browse1 $Process0Path = FileOpenDialog( "Open Process" , @WorkingDir & "\" , "Process (*.exe)", 1 ) GUICtrlSetData( $inp_Process0 , StringRegExpReplace( $Process0Path , '^.*\\' , '' ) ) When I press the button $btn_Browse1 a open file dialog shows. Whit that you can only open .exe files to get their filename and path. I then split the filename from the path and store it in another variable and shows them in the program. All working fine so far. But here's the problem. When trying to save $Process0Path and $inp_Process0 to an .ini file nothing gets saved, UNLESS the choosen .exe is in the same folder as this app... Here's the code for saving. Don't think anything is wrong here though as I can successfully save other variables to the same .ini file. IniWrite( @WorkingDir & "\Config.ini" , "ProcessName" , "Process0" , GUICtrlRead( $inp_Process0 ) ) IniWrite( @WorkingDir & "\Config.ini" , "ProcessPath" , "Process0" , $Process0Path ) An ideas of what's wrong? Edited June 10, 2010 by CZorg Link to comment Share on other sites More sharing options...
Xenobiologist Posted June 10, 2010 Share Posted June 10, 2010 The FilopenDialog changes the WorkingDir the ini is saved in the wrong folder. Try using @scripdir instead. 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 10, 2010 Share Posted June 10, 2010 From the help file under FileOpenDialog(): @WorkingDir is changed on successful return. 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...
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