APSF,0 //############################################################################## // Name : LaunchApp // Purpose : Launch external application // Requires: AP v1.5.1 or above // Author : Robin Lauryssen-Mitchell // Date : 31st July 2006 // Version : 1.0 // Status : Production // History : 20060801 - 0.1 - Internal testing only // 20060801 - 1.0 - Production release // Notes : Intended to launch editors that do not accept file name arguments // that contain spaces gracefully even when enclosed in "" // (example PSPad). // // IMPORTANT: YOU MUST HAVE THE FILE TYPE ASSOCIATED WITH THE EDITOR // OR OTHER APPLICATION YOU INTEND TO LAUNCH. // // Personally I use this to edit a script that can be run from the // script menu. That way the Scripts dialogue does not need to be // open. This reduces the possibilty for confusion about which editor // should be used. Of course this script should also be run from the // Scipt menu. When used with an editor application I like to rename // the script with the name of the application (e.g. PSPad) // // ASIDE: PSPad is rapidly becoming my free script editor of choice. // See http://www.pspad.com for more information. // I wonder if the author being Czech has anything to do with // my liking this application :-D // // Launch seems to remember where the last file was selected from. // This makes it a little more user friendly that GetFilePath (IMHO). //############################################################################## //****************************************************************************** // Declarations //****************************************************************************** //============================================================================== // Const declarations //============================================================================== const cAppForeground = true //Make the editor the foreground app when launched const cEmptyFilePath = "" //Used to make Launch open file selection dialogue //============================================================================== // Var declarations //============================================================================== dim LaunchDone as boolean //Flag returned by Launch command //****************************************************************************** // Main Code //****************************************************************************** LaunchDone = Launch(cEmptyFilePath, cAppForeground) //Launch the required app