lgging
Posted: Tue Oct 08, 2013 5:40 pm
Hi,
I was creating a script for Indesign and I was wondering how you could log some things to the message pane in Powerswitch.
Logging errors is done like:
catch(theError) {
$error = theError.description;
}
Many scripting mistakes does go to the catch method but it only states: %1. That is not a lot of help.
So I tried:
catch(theError) {
if (theError.description == "%1") //also tried $error == "%1"
$error = "test error message";
else
$error = theError.description;
}
But that doesn't work,
I would like some normal logging (or warnings or debug messages, they are easier to read)
In Switchscripter it's easy (s.log(1,"test warning");)
How do I go about that in a command execution script for an Adobe app?
I was creating a script for Indesign and I was wondering how you could log some things to the message pane in Powerswitch.
Logging errors is done like:
catch(theError) {
$error = theError.description;
}
Many scripting mistakes does go to the catch method but it only states: %1. That is not a lot of help.
So I tried:
catch(theError) {
if (theError.description == "%1") //also tried $error == "%1"
$error = "test error message";
else
$error = theError.description;
}
But that doesn't work,
I would like some normal logging (or warnings or debug messages, they are easier to read)
In Switchscripter it's easy (s.log(1,"test warning");)
How do I go about that in a command execution script for an Adobe app?