//DESCRIPTION: Resets active window size or uses front window to set default size. // Check for WindowDefault.txt; if present use it to set front window // if not, use front window to set it after checking with user. myPath = app.activeScript; myParts = myPath.toString().split("/"); myParts[(myParts.length - 1)] = "WindowDefault" + app.version.slice(0,1) + ".txt"; myNewPath = myParts.join("/"); mySettingsFile = File(myNewPath); // Before proceeding, check that there is a front window // If not, offer user the chance to delete the current settings if (app.windows.length < 1) { beep(); if (confirm("No window is open; would you like to delete the settings file?")) { // User said yes; check that it exists if(mySettingsFile.exists) { mySettingsFile.remove(); } } } else { if (mySettingsFile.open("r")) { savedBounds = mySettingsFile.read(); mySettingsFile.close(); myBounds = savedBounds.split(","); for (i = 0; i