Champak Posted May 1, 2006 Posted May 1, 2006 (edited) I've searched for this and couldn't find it. I'm almost done my script and I am wondering if it is possible to create a preference/options in a menu on the particular GUI script I'm using? If it is possible, will I need to close that script and restart the script, or will it automatically set once I hit enter on the preference and then go on the script? Or do I need to create a ( B ) gui to set the preferences on ( A ) gui? Could you give an example if possible please? Thanks. Edited May 1, 2006 by Champak
Moderators SmOke_N Posted May 1, 2006 Moderators Posted May 1, 2006 I've searched for this and couldn't find it.I'm almost done my script and I am wondering if it is possible to create a preference/options in a menu on the particular GUI script I'm using?If it is possible, will I need to close that script and restart the script, or will it automatically set once I hit enter on the preference and then go on the script?Or do I need to create a ( B ) gui to set the preferences on ( A ) gui?Could you give an example if possible please?Thanks.I guess that would depend on what you would do for preferences, is it a UDF you can run within your script?A suggestion would be (Only if you really want help), post your script, and comment what you want to do once the preferences option is chose. Other than that, many of us could guess what you really wanted, but it would only be a "guess". Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Champak Posted May 1, 2006 Author Posted May 1, 2006 (edited) I guess that would depend on what you would do for preferences, is it a UDF you can run within your script?A suggestion would be (Only if you really want help), post your script, and comment what you want to do once the preferences option is chose. Other than that, many of us could guess what you really wanted, but it would only be a "guess".Thanks, here is my first script. 1/ All comments beginning with ";-N----" (which are send functions) and some of the sleep times are what I want to put in some type of preference/options menu that is selectable and changeable. IF it is a MUST, I guess another GUI script could be set up that will print the settings to this one.2/ The part that tells the drive space inbetween ";///////////////////////////////////////////////////////////////////////////////////////", I would like to be able to have an input where I could type the drive letter in and press "enter", and it will immediately return the info. However, I was trying for a couple hours last night and I couldn't get it to do that.3/ The last part of this script with the nested "if" function, you can see what I would like it to do, but I can't get it to work.4/ And last, I would like to set up a progress bar that will show where in the process things are on the GUI, however, beyond the fact I really didn't look for how to do that yet, I'm wondering if that will even work if I have the "variable input looping function" going here.----------------------------Script has been edited and shown below in updated condition-------------------------------Thanks for all help. Edited May 3, 2006 by Champak
Valuater Posted May 1, 2006 Posted May 1, 2006 maybe this could help expandcollapse popup#include <GUIConstants.au3> ;You cannot have channels linked in the mixer for auto mixdown to work ;left - top - width - height $Main = GUICreate("Nuendo Auto Mixdown", 283, 375, 150, 20);width, height, ?, ? GUICtrlCreatePic("nuendo2.gif", 0, 0, 286, 375, $WS_EX_LAYERED) $removeMD = GUICtrlCreateCheckbox("Remove original track after mixdown.", 10, 5, 200) GUICtrlSetBkColor(-1, 0xADC7DE) $removeUM = GUICtrlCreateCheckbox("Remove unused media from pool.", 10, 35, 200) GUICtrlSetBkColor(-1, 0xADC7DE) $emptytrash = GUICtrlCreateCheckbox("Empty trash.", 10, 65, 200) GUICtrlSetBkColor(-1, 0xADC7DE) $exportmaster = GUICtrlCreateCheckbox("Create a master 2 track mixdown.", 10, 95, 200) GUICtrlSetBkColor(-1, 0xADC7DE) $label1 = GUICtrlCreateLabel("Number of tracks in multitrack to mixdown.", 10, 125, 215, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $loop = GUICtrlCreateInput("", 220, 125, 27, 21, $ES_NUMBER) $label2 = GUICtrlCreateLabel("Bypass:", 10, 155, 162, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $label3 = GUICtrlCreateLabel("(If you do not want to print)", 10, 170, 162, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $eq = GUICtrlCreateCheckbox("EQs", 10, 185) ;Mixer WQs GUICtrlSetBkColor(-1, 0xADC7DE) $send = GUICtrlCreateCheckbox("Sends", 60, 185) ;Mixer Send GUICtrlSetBkColor(-1, 0xADC7DE) $insert = GUICtrlCreateCheckbox("Inserts", 120, 185) ;Mixer Inserts GUICtrlSetBkColor(-1, 0xADC7DE) $save = GUICtrlCreateCheckbox("Save", 10, 215) ;Save GUICtrlSetBkColor(-1, 0xADC7DE) $label4 = GUICtrlCreateLabel("( Or )", 70, 215, 30, "", $ES_CENTER) GUICtrlSetBkColor(-1, 0xADC7DE) $saveasCHBX = GUICtrlCreateCheckbox("Save As:", 114, 215) GUICtrlSetBkColor(-1, 0xADC7DE) $saveasINPT = GUICtrlCreateInput("", 177, 215, 96, 21) ;Save As $ok = GUICtrlCreateButton("Ok", 10, 240, 80, 20) ;Submit GUICtrlSetBkColor(-1, 0xADC7DE) $pref = GUICtrlCreateButton("Settings", 100, 240, 80, 20) ;Pref's GUICtrlSetBkColor(-1, 0xADC7DE) $cancel = GUICtrlCreateButton("Cancel", 195, 240, 80, 20) ;Cancel GUICtrlSetBkColor(-1, 0xADC7DE) ;/////////////////////////////////////////////////////////////////////////////////////// ;/////////////////////////////////////////////////////////////////////////////////////// $total = DriveSpaceTotal("D:") $free = DriveSpaceFree("D:") $used = $total - $free $progress = GUICtrlCreateProgress(10, 265, 264, 20, $PBS_SMOOTH) GUICtrlSetBkColor(-1, 0xff0000) $labe5 = GUICtrlCreateLabel("Check Drive.", 10, 285, 64, 20) GUICtrlSetBkColor(-1, 0xADC7DE) GUICtrlSetData($progress, 100 * $used / DriveSpaceTotal("D:")) GUICtrlCreateLabel(Round($used / 1024, 2) & " GB used ", 115, 285, 80, 20, $ES_CENTER) GUICtrlSetBkColor(-1, 0xADC7DE) ;$labe5 = GUICtrlCreateLabel ( "Note", 105, 285, 70, "15",$ES_CENTER) ;GUICtrlSetBkColor(-1,0xADC7DE) ;GUICtrlSetTip(-1,"If you have multiple drives, this should be set to your Audio drive on line 57, 58, 65") GUICtrlCreateLabel(Round($free / 1024, 2) & " GB free ", 193, 285, 80, 20, $ES_CENTER) GUICtrlSetBkColor(-1, 0xADC7DE) ;/////////////////////////////////////////////////////////////////////////////////////// ;/////////////////////////////////////////////////////////////////////////////////////// GUISetState() ;////////////////////////////////////////////////////////////////////////////////////// $Child = GUICreate("Nuendo - Settings", 283, 375, 150, 20);width, height, ?, ? GUICtrlCreatePic("nuendo2.gif", 0, 0, 286, 375, $WS_EX_LAYERED) $removeMD2 = GUICtrlCreateCheckbox("use this", 10, 5, 200) GUICtrlSetBkColor(-1, 0xADC7DE) $removeUM2 = GUICtrlCreateCheckbox("Use that.", 10, 35, 200) GUICtrlSetBkColor(-1, 0xADC7DE) $emptytrash2 = GUICtrlCreateCheckbox("Drive D:", 10, 65, 200) GUICtrlSetBkColor(-1, 0xADC7DE) $exportmaster2 = GUICtrlCreateCheckbox("Drive C:.", 10, 95, 200) GUICtrlSetBkColor(-1, 0xADC7DE) $label12 = GUICtrlCreateLabel("Input New Drive", 10, 125, 215, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $loop2 = GUICtrlCreateInput("", 220, 125, 27, 21, $ES_NUMBER) $label22 = GUICtrlCreateLabel("Etc.", 10, 155, 162, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $ok2 = GUICtrlCreateButton("Ok", 10, 240, 80, 20) ;Submit GUICtrlSetBkColor(-1, 0xADC7DE) $cancel2 = GUICtrlCreateButton("Cancel", 195, 240, 80, 20) ;Cancel GUICtrlSetBkColor(-1, 0xADC7DE) ;////////////////////////////////////////////////// GUISetState(@SW_HIDE) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancel Exit Case $msg = $ok Function() Case $msg = $pref GUISetState(@SW_HIDE, $Main) GUISetState(@SW_SHOW, $Child) Case $msg = $ok2 GUISetState(@SW_HIDE, $Child) GUISetState(@SW_SHOW, $Main) EndSelect WEnd Func Function() WinSetState("Nuendo Auto Mixdown", "", @SW_MINIMIZE) WinActivate("Nuendo") Sleep(2000) ;Open Mixer and bypass all eqs, sends, inserts Send("{F3}") ;-N----Opens mixer WinWaitActive("Nuendo", "Mixer") Sleep(300) $Beq = GUICtrlRead($eq) If $Beq = 1 Then Send("!+e") ;-N----Bypass eqs EndIf $Bsend = GUICtrlRead($send) If $Bsend = 1 Then Send("!+s") ;-N----Bypass sends EndIf $Binsert = GUICtrlRead($insert) If $Binsert = 1 Then Send("!+i") ;-N----Bypass inserts EndIf Sleep(700) Send("{F3}") ;-N----Opens mixer ;Start Mixing Down Send("{HOME}") ;Go to top of multitrack Sleep(1000) ;Start the loop function $looping = GUICtrlRead($loop) For $a = 1 To $looping Send("s") ;-N----Solo track Sleep(1000) ;Time before next step 1000 = 1 second Send("^!+s") ;-N----Selects all on particular track Sleep(1500) Send("!1") ;Opens edit view WinWaitActive("Nuendo", "Sample Editor:") Sleep(500) $bull = StringTrimLeft(WinGetText(""), 15) ;Copys title of track and deletes "Sample Editor:" Sleep(100) Send("!1") ;-N----Close edit view WinWaitClose("Nuendo", "Sample Editor:") Sleep(1000) Send("!e") ;-N----Opens mixdown window WinWaitActive("Export Audio Mixdown in", "File name:") Sleep(1000) $Split = StringSplit($bull, @LF) ;Split off LFs from copying the text of "Sample Editor" If IsArray($Split) Then For $i = 1 To 1 Send($Split[$i]) ;Pastes split up track name Next EndIf Sleep(1500) Send("{ENTER}") ;Save---start mixdown WinWaitClose("Export Audio Mixdown in", "File name:") Sleep(1000) If WinExists("Nuendo", "Do you want to replace") Then Send("{ENTER}") ;EndIf Sleep(2000) ;If there are situations where you will have tracks that ARE NOT in the pool, uncomment the line before AND after this line, AND comment out the sleep function at the beginning of this line. ;If WinExists("Nuendo", "Continue") Then Send("{ENTER}") WinWaitClose("Export Audio:", "Abort") Sleep(3000) EndIf If WinExists("Nuendo", "Import Options") Then Send("{ENTER}") ;import Sleep(3000) EndIf WinWaitClose("Export Audio:", "Abort") Sleep(1000) Send("s") ;-N----unsolo track Sleep(3000) $removingMD = GUICtrlRead($removeMD) ;remove original mixed down track If $removingMD = 1 Then Send("!r") ;-N----Remove track Sleep(4000) Else Send("{DOWN}") ;move to the next track Sleep(2000) EndIf Next ;loop until number of times specified ;Open Mixer and clear bypass on all eqs, sends, inserts Send("{F3}") ;-N----Open mixer WinWaitActive("Nuendo", "Mixer") Sleep(300) $Beq = GUICtrlRead($eq) If $Beq = 1 Then Send("!+e") ;-N----Bypass egs EndIf $Bsend = GUICtrlRead($send) If $Bsend = 1 Then Send("!+s") ;-N----Bypass sends EndIf $Binsert = GUICtrlRead($insert) If $Binsert = 1 Then Send("!+i") ;-N----Bypass inserts EndIf Sleep(700) Send("{F3}") ;-N----Close mixer Sleep(3000) ;Final options $removingUM = GUICtrlRead($removeUM) ;Remove unused media option If $removeUM = 1 Then Send("!+r") ;-N----Remove unused media from pool to trash Sleep(500) EndIf $emptyingtrash = GUICtrlRead($emptytrash) ;Empty trash option If $emptyingtrash = 1 Then Send("!t") ;-N----Erase pool trash from Hard Disk WinWaitActive("Nuendo", "Erase") Send("{ENTER}") Sleep(5000) EndIf $exportingmaster = GUICtrlRead($exportmaster) ;Export a master 2 track of mix If $exportingmaster = 1 Then $MasterMixdown1 = StringTrimLeft(WinGetText(""), 14) ;Copys title of track and deletes "Sample Editor:" Sleep(100) $MasterMixdown2 = StringTrimRight($MasterMixdown1, 5) ;Copys title of track and deletes "Sample Editor:" Sleep(100) Send("!e") ;-N----Opens mixdown window Sleep(500) Send("Mixdown ") Sleep(700) Send($MasterMixdown2) ;Pastes final name of track Sleep(9000) Send("{ENTER}") Sleep(1000) If WinExists("Nuendo", "Do you want to replace") Then Send("{ENTER}") ; EndIf Sleep(500) ;If there are situations where you will have tracks that ARE NOT in the pool, uncomment the line before AND after this line, AND comment out the sleep function at the beginning of this line. ; If WinExists("Nuendo", "This file is already used in a pool") Then Send("{ENTER}") WinWaitClose("Nuendo", "Estimated Time Remaining") Sleep(3000) EndIf If WinExists("Nuendo", "Import Options") Then Send("{ENTER}") Sleep(3000) EndIf WinWaitClose("Export Audio:", "Abort") $CHBXsaveas = GUICtrlRead($saveasCHBX) If $CHBXsaveas = 0 Then MsgBox(64, "Auto Mixdown", "Your auto mixdown is complete. Master track has been exported.") EndIf EndIf $saving = GUICtrlRead($save) ;Save option If $saving = 1 Then Send("^s") ;-N----Save Sleep(1000) MsgBox(64, "Auto Mixdown", "Your auto mixdown is complete. And has been saved.") EndIf $CHBXsaveas = GUICtrlRead($saveasCHBX) ;Save As option If $CHBXsaveas = 1 Then Send("^+s") ;-N----Save As WinWait("Save As -") $INPTsaveas = GUICtrlRead($saveasINPT) Send($INPTsaveas) Sleep(500) Send("{ENTER}") Sleep(1000) If $exportingmaster = 0 Then MsgBox(64, "Auto Mixdown", "Your auto mixdown is complete and as saved as" & $INPTsaveas) Else MsgBox(64, "Auto Mixdown", "Your master track has been exported - Your auto mixdown is complete, and saved as" & $INPTsaveas) EndIf EndIf EndFunc ;==>Function 8)
Champak Posted May 2, 2006 Author Posted May 2, 2006 (edited) 1/ Thanks, however, what you showed me wasn't really what I needed because once the script closed the info was gone; I wanted the info to stay permanently. However continuing to read the forum I got an idea to use an ini file. However, I can't get it to write, but it reads the ini. This is what I have so far. $Where='test.ini' $solo6=IniRead($Where, 'Sleep', 'Solo Send', 'no') $solo=GUICtrlCreateInput($spam6, 10,10) iniwrite($Where, 'Sleep', 'Solo Send', '$solo') "I've tried the "$solo" in the iniwrite with and without the quotes 2/ I'll have to wait for the answer for #1. 3/ I had a logic problem that's fixed now. 4/ Would still like to get the info for this.. Edited May 2, 2006 by Champak
GaryFrost Posted May 2, 2006 Posted May 2, 2006 1/ Thanks, however, what you showed me wasn't really what I needed because once the script closed the info was gone; I wanted the info to stay permanently. However continuing to read the forum I got an idea to use an ini file. However, I can't get it to write, but it reads the ini. This is what I have so far. $Where='test.ini' $solo6=IniRead($Where, 'Sleep', 'Solo Send', 'no') $solo=GUICtrlCreateInput($spam6, 10,10) iniwrite($Where, 'Sleep', 'Solo Send', '$solo') "I've tried the "$solo" in the iniwrite with and without the quotes 2/ I'll have to wait for the answer for #1. 3/ I had a logic problem that's fixed now. 4/ Would still like to get the info for this.. iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($solo)) SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference. Â
Champak Posted May 3, 2006 Author Posted May 3, 2006 That didn't work, however, I know what the problem is now, but I don't know how to solve it. It would seem that, although the settings are on the child page, when the script is initially opened on the parent page, the script of the child page is activated at that time. Then when I go to the child page, and type something in and save/ok, it doesn't do it on that page. Here is what the script looks like now...disregard the previous ones. Thanks. expandcollapse popup#include <GUIConstants.au3> ;left - top - width - height $Main = GUICreate ("Nuendo Auto Mixdown", 283, 410);width, height GuiCtrlCreatePic("nuendo2.gif",0,0, 286, 395, $WS_EX_LAYERED) GuiCtrlCreateGroup("Optional", 10, 10, 261, 130) GUICtrlSetBkColor(-1,0xADC7DE) $removeMD = GuiCtrlCreateCheckbox("Remove original track after mixdown.", 15, 25, 200) GUICtrlSetBkColor(-1,0xADC7DE) $removeUM = GuiCtrlCreateCheckbox("Remove unused media from pool.", 15, 55, 200) GUICtrlSetBkColor(-1,0xADC7DE) $emptytrash = GuiCtrlCreateCheckbox("Empty trash.", 15, 85, 200) GUICtrlSetBkColor(-1,0xADC7DE) $exportmaster = GuiCtrlCreateCheckbox("Create a master 2 track mixdown.", 15, 115, 200) GUICtrlSetBkColor(-1,0xADC7DE) $label1 = GUICtrlCreateLabel ( "Number of tracks in multitrack to mixdown.", 15, 145, 215, 20) GUICtrlSetBkColor(-1,0xADC7DE) $loop = GUICtrlCreateInput("", 240, 145, 27, 21, $ES_NUMBER) GuiCtrlCreateGroup("Bypass Mixer Settings:", 10, 170, 261, 60) GUICtrlSetBkColor(-1,0xADC7DE) $label3 = GUICtrlCreateLabel ( "(If you do not want to print)", 15, 190, 155, 20) GUICtrlSetBkColor(-1,0xADC7DE) $eq = GuiCtrlCreateCheckbox("EQs",15,205) ;Mixer WQs GUICtrlSetBkColor(-1,0xADC7DE) $send = GuiCtrlCreateCheckbox("Sends",65,205) ;Mixer Send GUICtrlSetBkColor(-1,0xADC7DE) $insert = GuiCtrlCreateCheckbox("Inserts",125,205) ;Mixer Inserts GUICtrlSetBkColor(-1,0xADC7DE) $BypassAll = GUICtrlCreateCheckbox("Bypass All", 190, 205) ;Bypass All GUICtrlSetBkColor(-1,0xADC7DE) $save = GuiCtrlCreateCheckbox("Save",10, 235) ;Save GUICtrlSetBkColor(-1,0xADC7DE) $label4 = GUICtrlCreateLabel ( "( Or )", 66, 235, 30, "",$ES_CENTER) GUICtrlSetBkColor(-1,0xADC7DE) $saveasCHBX = GuiCtrlCreateCheckbox("Save As:",110, 235) GUICtrlSetBkColor(-1,0xADC7DE) $saveasINPT = GUICtrlCreateInput("", 174, 235, 96, 21) ;Save As $ok = GUICtrlCreateButton("Ok", 10, 260, 80, 20) ;Submit GUICtrlSetBkColor(-1, 0xADC7DE) $pref = GUICtrlCreateButton("Settings", 100, 260, 80, 20) ;Pref's GUICtrlSetBkColor(-1, 0xADC7DE) $cancel = GUICtrlCreateButton("Cancel", 190, 260, 80, 20) ;Cancel GUICtrlSetBkColor(-1, 0xADC7DE) ;/////////////////////////////////////////////////////////////////////////////////////// ;/////////////////////////////////////////////////////////////////////////////////////// $Drive = IniRead("test.ini", "Drive", "Letter", "NotFound") $total = DriveSpaceTotal($Drive) $free = DriveSpaceFree($Drive) $used = $total - $free $progress = GuiCtrlCreateProgress(10, 285, 260, 20, $PBS_SMOOTH) GUICtrlSetBkColor(-1,0xff0000) $labe5 = GUICtrlCreateLabel ( "Check Drive.", 10, 305, 64, 20) GUICtrlSetBkColor(-1,0xADC7DE) GuiCtrlSetData($progress, 100 * $used / DriveSpaceTotal($Drive)) GuiCtrlCreateLabel(Round($used/1024,2) & " GB used ", 115, 305, 80, 20,$ES_CENTER) GUICtrlSetBkColor(-1,0xADC7DE) ;$labe5 = GUICtrlCreateLabel ( "Note", 105, 305, 70, "15",$ES_CENTER) ;GUICtrlSetBkColor(-1,0xADC7DE) ;GUICtrlSetTip(-1,"If you have multiple drives, this should be set to your Audio drive on line 57, 58, 65") GuiCtrlCreateLabel(Round($free/1024,2) & " GB free ", 193, 305, 80, 20,$ES_CENTER) GUICtrlSetBkColor(-1,0xADC7DE) ;/////////////////////////////////////////////////////////////////////////////////////// ;/////////////////////////////////////////////////////////////////////////////////////// $filemenu = GUICtrlCreateMenu ("&File") $fileitem = GUICtrlCreateMenuitem ("Open Nuendo",$filemenu) GUICtrlSetState(-1,$GUI_DEFBUTTON) $helpmenu = GUICtrlCreateMenu ("?") $infoitem = GUICtrlCreateMenuitem ("Info",$helpmenu) GuiSetState() ;////////////////////////////////////////////////////////////////////////////////////// $Child = GUICreate("Nuendo - Settings", 283, 375);width, height, ?, ? GUICtrlCreatePic("nuendo2.gif", 0, 0, 286, 375, $WS_EX_LAYERED) $Where='test.ini' $A='Sleep after' $labelSleep1 = GUICtrlCreateLabel($A &" ..." , 10, 10, 220, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $sleep1=IniRead($Where, 'Sleep', 'Solo Send', 'no') $sleep2=GUICtrlCreateInput($sleep1, 230, 10, 36, 19, $ES_NUMBER) iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($sleep2)) $labelSleep2 = GUICtrlCreateLabel($A &" ..." , 10, 35, 220, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $sleep3=IniRead($Where, 'Sleep', 'Solo Send', 'no') $sleep4=GUICtrlCreateInput($sleep3, 230, 35, 36, 19, $ES_NUMBER) iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($sleep4)) $labelSleep3 = GUICtrlCreateLabel($A &" ..." , 10, 60, 220, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $sleep5=IniRead($Where, 'Sleep', 'Solo Send', 'no') $sleep6=GUICtrlCreateInput($sleep5, 230, 60, 36, 19, $ES_NUMBER) iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($sleep6)) $labelSleep4 = GUICtrlCreateLabel($A &" ..." , 10, 85, 220, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $sleep7=IniRead($Where, 'Sleep', 'Solo Send', 'no') $sleep8=GUICtrlCreateInput($sleep7, 230, 85, 36, 19, $ES_NUMBER) iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($sleep8)) $labelSleep5 = GUICtrlCreateLabel($A &" ..." , 10, 110, 220, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $sleep9=IniRead($Where, 'Sleep', 'Solo Send', 'no') $sleep10=GUICtrlCreateInput($sleep9, 230, 110, 36, 19, $ES_NUMBER) iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($sleep10)) $labelSleep6 = GUICtrlCreateLabel($A &" ..." , 10, 135, 220, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $sleep11=IniRead($Where, 'Sleep', 'Solo Send', 'no') $sleep12=GUICtrlCreateInput($sleep11, 230, 135, 36, 19, $ES_NUMBER) iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($sleep12)) $labelSleep7 = GUICtrlCreateLabel($A &" ..." , 10, 160, 220, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $sleep13=IniRead($Where, 'Sleep', 'Solo Send', 'no') $sleep14=GUICtrlCreateInput($sleep13, 230, 160, 36, 19, $ES_NUMBER) iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($sleep14)) $labelSleep8 = GUICtrlCreateLabel($A &" ..." , 10, 185, 220, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $sleep15=IniRead($Where, 'Sleep', 'Solo Send', 'no') $sleep16=GUICtrlCreateInput($sleep15, 230, 185, 36, 19, $ES_NUMBER) iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($sleep16)) $labelDrive = GUICtrlCreateLabel("Check audio drive space ex. D:" , 10, 185, 220, 20) GUICtrlSetBkColor(-1, 0xADC7DE) $drive1=IniRead($Where, 'Sleep', 'Solo Send', 'no') $drive2=GUICtrlCreateInput($drive1, 230, 185, 36, 19, $ES_NUMBER) iniwrite($Where, 'Sleep', 'Solo Send', guictrlread($drive2)) $ok2 = GUICtrlCreateButton("Ok", 10, 240, 80, 20) ;Submit GUICtrlSetBkColor(-1, 0xADC7DE) $cancel2 = GUICtrlCreateButton("Cancel", 195, 240, 80, 20) ;Cancel GUICtrlSetBkColor(-1, 0xADC7DE) ;////////////////////////////////////////////////// GUISetState(@SW_HIDE) While 1 $msg = GUIGetMsg() If $msg = $fileitem Then RunWait("C:\Additions\Studio\Appz\Nuendo v3.2\Nuendo3.exe") EndIf If $msg = $infoitem Then Msgbox(0,"Info","Only a test...") If $msg = $BypassAll Then If GUICtrlRead($BypassAll) = $GUI_CHECKED Then GUICtrlSetState($eq, $GUI_CHECKED) GUICtrlSetState($insert, $GUI_CHECKED) GUICtrlSetState($send, $GUI_CHECKED) Else GUICtrlSetState($eq, $GUI_UNCHECKED) GUICtrlSetState($insert, $GUI_UNCHECKED) GUICtrlSetState($send, $GUI_UNCHECKED) EndIf EndIf If $msg = $eq Then If GUICtrlRead($eq) = $GUI_UNCHECKED Then GUICtrlSetState($BypassAll, $GUI_UNCHECKED) EndIf EndIf If $msg = $insert Then If GUICtrlRead($insert) = $GUI_UNCHECKED Then GUICtrlSetState($BypassAll, $GUI_UNCHECKED) EndIf EndIf If $msg = $send Then If GUICtrlRead($send) = $GUI_UNCHECKED Then GUICtrlSetState($BypassAll, $GUI_UNCHECKED) EndIf EndIf If $msg = $send AND $eq Then If GUICtrlRead($send) AND ($eq) = $GUI_CHECKED Then GUICtrlSetState($BypassAll, $GUI_CHECKED) EndIf EndIf ; If $msg = $BypassAll Then ; If GUICtrlRead($eq,$insert,$send) = $GUI_CHECKED Then ; GUICtrlSetState($BypassAll, $GUI_CHECKED) ; EndIf ; EndIf Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancel Exit Case $msg = $ok Function () Case $msg = $pref GUISetState(@SW_HIDE, $Main) GUISetState(@SW_SHOW, $Child) Case $msg = $ok2 GUISetState(@SW_HIDE, $Child) GUISetState(@SW_SHOW, $Main) EndSelect WEnd GUIDelete() Func Function () WinSetState ("Nuendo Auto Mixdown", "", @SW_MINIMIZE) WinActivate("Nuendo") Sleep (2000 ) ;Open Mixer and bypass all eqs, sends, inserts $BSends=GuiCtrlRead($send) $BInserts=GuiCtrlRead($insert) $BEQs=GuiCtrlRead($eq) if GUICtrlRead($send) = 1 or GUICtrlRead($insert) = 1 or Guictrlread($eq) = 1 Then Send("{F3}") ;-N----Opens mixer Sleep ( 300 ) if $BEQs = 1 then Send("!+e") ;-N----Bypass eqs Endif if $BSends = 1 then Send("!+s") ;-N----Bypass sends Endif if $BInserts = 1 then Send("!+i") ;-N----Bypass inserts Endif Sleep ( 700 ) Send("{F3}") ;-N----Opens mixer Endif ;Start Mixing Down Send("{HOME}") ;Go to top of multitrack Sleep ( 1000 ) ;Start the loop function $looping=GuiCtrlRead($loop) For $a = 1 to $looping Send("s") ;-N----Solo track Sleep ( 1000 ) ;Time before next step 1000 = 1 second Send("^!+s") ;-N----Selects all on particular track Sleep ( 1500 ) Send("!1") ;Opens edit view WinWaitActive ("Nuendo", "Sample Editor:") Sleep ( 500 ) $bull = StringTrimLeft(WinGetText(""), 15) ;Copys title of track and deletes "Sample Editor:" Sleep ( 100 ) Send("!1") ;-N----Close edit view WinWaitClose("Nuendo", "Sample Editor:") Sleep ( 1000 ) Send("!e") ;-N----Opens mixdown window WinWaitActive("Export Audio Mixdown in", "File name:") Sleep ( 1000 ) $Split = StringSplit($bull, @LF) ;Split off LFs from copying the text of "Sample Editor" If IsArray($Split) Then For $i = 1 To 1 Send($Split[$i]) ;Pastes split up track name Next EndIf Sleep ( 1500 ) Send("{ENTER}") ;Save---start mixdown WinWaitClose("Export Audio Mixdown in", "File name:") Sleep ( 1000 ) If WinExists("Nuendo", "Do you want to replace") Then Send("{ENTER}") ;EndIf Sleep( 2000 ) ;If there are situations where you will have tracks that ARE NOT in the pool, uncomment the line before AND after this line, AND comment out the sleep function at the beginning of this line. ;If WinExists("Nuendo", "Continue") Then Send("{ENTER}") WinWaitClose("Export Audio:", "Abort") Sleep( 3000 ) EndIf If WinExists("Nuendo", "Import Options") Then Send("{ENTER}") ;import Sleep ( 3000 ) EndIf WinWaitClose("Export Audio:", "Abort") Sleep ( 1000 ) Send("s") ;-N----unsolo track Sleep ( 3000 ) $removingMD=GuiCtrlRead($removeMD) ;remove original mixed down track if $removingMD = 1 then Send("!r") ;-N----Remove track Sleep (4000) Else Send("{DOWN}") ;move to the next track Sleep( 2000 ) Endif Next ;loop until number of times specified ;Open Mixer and clear bypass on all eqs, sends, inserts $BSends=GuiCtrlRead($send) $BInserts=GuiCtrlRead($insert) $BEQs=GuiCtrlRead($eq) if GUICtrlRead($send) = 1 or GUICtrlRead($insert) = 1 or Guictrlread($eq) = 1 Then Send("{F3}") ;-N----Open mixer WinWaitActive ( "Nuendo", "Mixer" ) Sleep ( 300 ) if $BEQs = 1 then Send("!+e") ;-N----Bypass egs Endif if $BSends = 1 then Send("!+s") ;-N----Bypass sends Endif if $BInserts = 1 then Send("!+i") ;-N----Bypass inserts Endif Sleep ( 700 ) Send("{F3}") ;-N----Close mixer Endif Sleep ( 2000 ) ;Final options $removingUM=GuiCtrlRead($removeUM) ;Remove unused media option if $removeUM = 1 then Send("!+r") ;-N----Remove unused media from pool to trash Sleep ( 500 ) Endif $emptyingtrash=GuiCtrlRead($emptytrash) ;Empty trash option if $emptyingtrash = 1 then Send("!t") ;-N----Erase pool trash from Hard Disk WinWaitActive ( "Nuendo", "Erase" ) Send("{ENTER}") Sleep ( 5000 ) Endif ;///////////////////////////////////////Begin Exporting Two Track Mixdown////////////////// $exportingmaster=GuiCtrlRead($exportmaster) ;Export a master 2 track of mix if $exportingmaster = 1 then $MasterMixdown1 = StringTrimLeft(WinGetText(""), 14) ;Copys title of track and deletes "Sample Editor:" Sleep ( 100 ) $MasterMixdown2 = StringTrimRight($MasterMixdown1, 5) ;Copys title of track and deletes "Sample Editor:" Sleep ( 100 ) Send("!e") ;-N----Opens mixdown window Sleep ( 500 ) Send ("Mixdown ") Sleep ( 700 ) Send ($MasterMixdown2) ;Pastes final name of track Sleep ( 9000 ) Send("{ENTER}") Sleep ( 1000 ) If WinExists("Nuendo", "Do you want to replace") Then Send("{ENTER}") ; EndIf Sleep( 500 ) ;If there are situations where you will have tracks that ARE NOT in the pool, uncomment the line before AND after this line, AND comment out the sleep function at the beginning of this line. ; If WinExists("Nuendo", "This file is already used in a pool") Then Send("{ENTER}") WinWaitClose("Nuendo", "Estimated Time Remaining") Sleep( 3000 ) EndIf If WinExists("Nuendo", "Import Options") Then Send("{ENTER}") Sleep ( 3000 ) EndIf WinWaitClose("Export Audio:", "Abort") Sleep ( 3000 ) $saveing1=GuiCtrlRead($save) $CHBX1saveas=GuiCtrlRead($saveasCHBX) ;Save As option if $saveing1 = 1 OR $CHBX1saveas = 1 then ; (DO NOTHING) Else MsgBox(64, "Auto Mixdown", "Your auto mixdown is complete. Master track has been exported." & @LF & "(Multitrack session is not yet saved)") EndIf Endif ;///////////////////////////////////////End Exporting Two Track Mixdown////////////////// $saveing2=GuiCtrlRead($save) ;Save option if $saveing2 = 1 then Send("^s") ;-N----Save Sleep ( 1000 ) MsgBox(64, "Auto Mixdown", "Your auto mixdown is complete. And has been saved.") Endif $CHBX2saveas=GuiCtrlRead($saveasCHBX) ;Save As option if $CHBX2saveas = 1 then Send("^+s") ;-N----Save As WinWait("Save As -") $INPTsaveas=GuiCtrlRead($saveasINPT) Send($INPTsaveas) Sleep ( 500 ) Send("{ENTER}") Sleep ( 1000 ) $exportingmaster2=GuiCtrlRead($exportmaster) if $exportingmaster2 = 1 then MsgBox(64, "Auto Mixdown", "Your master track has been exported - Your auto mixdown is complete, and saved as " & $INPTsaveas) Else MsgBox(64, "Auto Mixdown", "Your auto mixdown is complete and as saved as " & $INPTsaveas) Endif Endif Send("+f") EndFunc Also a note, I have a menu set up; on that menu I am able to launch the program that this script is for. After the program is launched, I am unable to run the main function of this script, also cant close the gui. I'm assuming that this is locked in a loop. How do I end it?
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