Last active
November 21, 2018 16:01
-
-
Save stevechap416/43bdf136d4ab7deb1d1d19b321c08bb3 to your computer and use it in GitHub Desktop.
Check for Installed Photoshop Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This script works by runnning a specific action in a given action set. I normally make this action | |
//do nothing at all, but if it's not present on a user's computer to throw a warning. This is important when | |
//scripts rely on specific actions and you want to alert the user that they may not work correctly unless they add or update | |
//the action set. | |
actionCheckFail = false; | |
try { | |
doAction('InstallCheck', 'MySetOfActions'); | |
} catch(e) { | |
alert ("The correct .atn file is not installed or is out of date. The script may not function properly or not at all.") | |
alert ("The most up-to-date action file can be found at <path>") | |
actionCheckFail = true; | |
} | |
//Do not allow the script to continue unless the action is present. | |
if (actionCheckFail != true) { | |
doMainFunction() | |
} else {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment