// -------------------------------------------------------------------------- // dbReloadFA.mel - MEL Script // -------------------------------------------------------------------------- // // DESCRIPTION: // A script that saves all the form data in the File // Automator window, re-sources and re-calls FileAutomator // and inputs the saved data back into the forms. // // This is done so that the MEL script created with // File Automator sources properly. // // REQUIRES: // dbFileAutomator.mel // // USAGE: // it's used automatically by dbFileAutomator.mel // // AUTHORS: // David Bokser - me@davidbokser.com // Copyright ©2005 David Bokser - All Rights Reserved. // // -------------------------------------------------------------------------- global proc dbReloadFA() { global string $gfaFuncName; global string $gfaFuncText; global string $gfaFileList[]; $gfaFileList = {}; $gfaFuncName = `textFieldGrp -q -tx nameTFG`; $gfaFuncText = `scrollField -q -tx scriptField`; int $i; int $numOfFiles = `textScrollList -q -numberOfItems fileNameTSL`; for ($i = 0; $i < $numOfFiles; $i++) { textScrollList -e -sii ($i + 1) fileNameTSL; string $selectedTSL[] = `textScrollList -q -si fileNameTSL`; $gfaFileList[$i] = $selectedTSL[0]; } source dbFileAutomator.mel; dbFileAutomator; textFieldGrp -e -tx $gfaFuncName nameTFG; scrollField -e -tx $gfaFuncText scriptField; for($node in $gfaFileList) { textScrollList -e -a $node fileNameTSL; } }