Champak Posted May 6, 2006 Posted May 6, 2006 I did a search and still can't get the following write ini to work correctly. In the following everything between ;/////////////////////////Child GUI for Settings Paths begins/////////////////////////// and ;//////////////////////Child GUI for Settings Paths ends///////////////////////////// is where I was experimenting with the read write ini. I only kept what I believe is the relevent info. All three just write numeric info to the ini once and wont write anything again, and justs read the initial info written. I found another post about "numeric crap" but it didn't help me. expandcollapse popup#include <GUIConstants.au3> Opt("TrayIconDebug", 1) DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) $Where='test.ini' $Main = GUICreate ("Nuendo Auto Mixdown", 283, 480);width, height GuiCtrlCreatePic("nuendo2.gif",0,0, 286, 465, $WS_EX_LAYERED) $ProgBar_1 = GUICtrlCreateProgress(10, 360, 260, 20, $PBS_Smooth) ;Progress bar for mixdown GuiCtrlCreateGroup("Optional", 10, 10, 261, 160) GUICtrlSetBkColor(-1,0xADC7DE) $removeMD = GuiCtrlCreateCheckbox("Remove original track after mixdown.", 15, 25, 200) ;Option - Remove original track GUICtrlSetBkColor(-1,0xADC7DE) $removeUM = GuiCtrlCreateCheckbox("Remove unused media from pool.", 15, 55, 200) ;Option - Remove unused media $ok = GUICtrlCreateButton("Ok", 10, 290, 80, 20) ;Submit button GUICtrlSetBkColor(-1, 0xADC7DE) $pref = GUICtrlCreateButton("Settings", 100, 290, 80, 20) ;Pref's button GUICtrlSetBkColor(-1, 0xADC7DE) $cancel = GUICtrlCreateButton("Cancel", 190, 290, 80, 20) ;Cancel button GUICtrlSetBkColor(-1, 0xADC7DE) GuiSetState() ;/////////////////////////////////////////////////////////////////////////////////////// ;/////////////////////////Child GUI for Settings Paths begins/////////////////////////// ;/////////////////////////////////////////////////////////////////////////////////////// $ChildSettings = GUICreate("Nuendo - Preferences", 283, 480) GUISetBkColor (0xADC7DE) GUICtrlCreatePic("nuendo2.gif", 0, 0, 286, 465, $WS_EX_LAYERED) $font="Comic Sans MS" $labelHotKey0 = GUICtrlCreateLabel("Settings" , 10, 5, 165, 25) GUICtrlSetFont (-1,13, 800, "", $font) GUICtrlSetBkColor(-1, 0xADC7DE) $labelSettings1 = GUICtrlCreateLabel("Path to Nuendo" , 10, 40, 165, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $settings1=IniRead($Where, 'Settings', 'Settings1', 'no') $settings2=GUICtrlCreateInput($settings1, 10, 55, 263, 19) iniwrite($Where, 'Settings', 'Settings1', guictrlread($settings2)) $labelSettings2 = GUICtrlCreateLabel("Path to two track editor" , 10, 85, 165, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $settings3=IniRead("C:\Documents and Settings\Money\Desktop\Gui test\test.ini", 'Settings', 'Settings2', 'no') $settings4=GUICtrlCreateInput($settings3, 10, 100, 263, 19) iniwrite("C:\Documents and Settings\Money\Desktop\Gui test\test.ini", 'Settings', 'Settings2', guictrlread($settings4)) $labelSettings3 = GUICtrlCreateLabel("Path to addit. app to launch on mixdown completion" , 10, 130, 165, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $settings5=GUICtrlCreateInput("", 10, 145, 263, 19) GUICtrlSetData($settings5, IniRead(@ScriptDir & "\test.ini", 'Settings', 'Settings3', 'no')) IniWrite(@ScriptDir & "\test.ini", "Settings", "Settings3", GUICtrlRead($settings5)) $ok5 = GUICtrlCreateButton("Save", 10, 365, 80, 20) ;Submit GUICtrlSetBkColor(-1, 0xADC7DE) $cancel5 = GUICtrlCreateButton("Cancel", 190, 365, 80, 20) ;Cancel GUICtrlSetBkColor(-1, 0xADC7DE) GUISetState(@SW_HIDE) ;/////////////////////////////////////////////////////////////////////////////////////// ;//////////////////////Child GUI for Settings Paths ends///////////////////////////// ;/////////////////////////////////////////////////////////////////////////////////////// ;/////////////////////////////////////////////////////////////////////////////////////// ;///////////////////////////////While function begins/////////////////////////////////// ;/////////////////////////////////////////////////////////////////////////////////////// While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancel Exit Case $msg = $ok ;Starts mixdown function Function () Case $msg = $pref ;Open settings GUISetState(@SW_HIDE, $Main) GUISetState(@SW_SHOW, $Child1) ; Case $msg = $ok2 ;Opens settings ; GUISetState(@SW_HIDE, $Child1) ; GUISetState(@SW_SHOW, $Main) ; Case $msg = $cancel2 ;Closes settings and returns to main page ; GUISetState(@SW_HIDE, $Child1) ; GUISetState(@SW_SHOW, $Main) Case $msg = $fileitem ;Opens Nuendo RUN("C:\Additions\Studio\Appz\Nuendo v3.2\Nuendo3.exe") Case $msg = $sleepitem ;Opens settings Nuendo help page GUISetState(@SW_HIDE, $Main) GUISetState(@SW_SHOW, $ChildSleepTime) Case $msg = $ok3 ;Closes help page and returns to main page GUISetState(@SW_HIDE, $ChildSleepTime) GUISetState(@SW_SHOW, $Main) Case $msg = $cancel3 ;Closes help page and returns to main page GUISetState(@SW_HIDE, $ChildSleepTime) GUISetState(@SW_SHOW, $Main) Case $msg = $hotkeyitem ;Opens settings hotkey page GUISetState(@SW_HIDE, $Main) GUISetState(@SW_SHOW, $ChildHotKey) Case $msg = $ok4 ;Closes help page and returns to main page GUISetState(@SW_HIDE, $ChildHotKey) GUISetState(@SW_SHOW, $Main) Case $msg = $cancel4 ;Closes help page and returns to main page GUISetState(@SW_HIDE, $ChildHotKey) GUISetState(@SW_SHOW, $Main) Case $msg = $settingsitem ;Opens settings application path page GUISetState(@SW_HIDE, $Main) GUISetState(@SW_SHOW, $ChildSettings) Case $msg = $ok5 ;Closes help page and returns to main page GUISetState(@SW_HIDE, $ChildSettings) GUISetState(@SW_SHOW, $Main) Case $msg = $cancel5 ;Closes help page and returns to main page GUISetState(@SW_HIDE, $ChildSettings) GUISetState(@SW_SHOW, $Main) Case $msg = $infoitem ;Opens help page GUISetState(@SW_HIDE, $Main) GUISetState(@SW_SHOW, $ChildInfo) Case $msg = $ok6 ;Closes help page and returns to main page GUISetState(@SW_HIDE, $ChildInfo) GUISetState(@SW_SHOW, $Main) Case $msg = $cancel6 ;Closes help page and returns to main page GUISetState(@SW_HIDE, $ChildInfo) GUISetState(@SW_SHOW, $Main) EndSelect WEnd ;/////////////////////////////////////////////////////////////////////////////////////// ;///////////////////////////////While function ends///////////////////////////////////// ;/////////////////////////////////////////////////////////////////////////////////////// GUIDelete() Func Function () WinActivate("Nuendo", "Project") ;WinSetOnTop ( "Nuendo", "Auto Mixdown", 1 ) Sleep (2000 ) ;////////////////////////////////////////////////////////////////////////////////////////////////// ;////////////////////////////Open mixer for bypass EQ, sends, and inserts////////////////////////// ;////////////////////////////////////////////////////////////////////////////////////////////////// EndFunc
Valuater Posted May 6, 2006 Posted May 6, 2006 well, i think when you get to Case $msg = $ok5 thats when it try's to save the info thus Case $msg = $ok5 iniwrite($Where, 'Settings', 'Settings1', guictrlread($settings2)) iniwrite("C:\Documents and Settings\Money\Desktop\Gui test\test.ini", 'Settings', 'Settings2', guictrlread($settings4)) ; after reading all the inputs and writting to the ini files... then GUISetState(@SW_HIDE, $ChildSettings) GUISetState(@SW_SHOW, $Main) 8)
Champak Posted May 6, 2006 Author Posted May 6, 2006 Thank you very much. Now I think for the first time I truely understand how the whole case and select thing works.
Valuater Posted May 7, 2006 Posted May 7, 2006 Thank you very much. Now I think for the first time I truely understand how the whole case and select thing works.welcome8)
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