/////////////////////////////////////////////////////////////////////////////// // Function: WhoAmI // Usage: Find out where the current script is located on disk // Input: // Return: File object for current script running // Example: var myCurrentLocationFolder = WhoAmI().parent; // Note: For Photoshop CS3 you can use File($.fileName) to replace this function /////////////////////////////////////////////////////////////////////////////// function WhoAmI() { var where; try { var FORCEERROR = FORCERRROR; } catch( err ) { where = File(err.fileName); } return where; }