I'm trying to write a script to run an action but need to make sure the action exists first. This is what I came up with so far, and it does work when there is nothing in the prompt but if I spell the action wrong it gives me an illustrator error that the action is not there. Should I use catch for this instead? function ActionTool() { var action = prompt('Enter Action Name', ''); var set = "MyActionSet"; if (action == false) { alert("This Action does not exist. Please try again", false); } else{ doScript( action , set ); } } ActionTool();
... View more