Problem using command script file of Acrobat configurator

Post Reply
Evan
Member
Posts: 30
Joined: Mon Feb 28, 2011 6:44 pm

Problem using command script file of Acrobat configurator

Post by Evan »

Hi all,

I'm currently working on duplicating a flow I've done on another switch and I not able to execute an acrobat script. My script is really simple and it call a application level function using Acrobat menu.



if(($error == null) && ($doc != null))

{

try

{

app.execMenuItem("SplitSeqAcroLabel")

}

catch(theError)

{

$error = theError;

$doc.closeDoc( {bNoSave : true} );

}

}


I got always 1 warning and 1 error.

The warning:

Possible errors in AppleScript: the command '/usr/bin/osascript /tmp/SWITCH_applescript__10947715' returned warning '2013-03-26 16:47:23.015 osascript[3927:707] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types_ 262): no suitable image found. Did find: /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers. '



And the error:

Script execution error: ERROR: NotAllowedError: Security settings prevent access to this property or method.



Even if I try this one i got the same warning and error:

try

{

var test1 = "test1"

}

catch(theError)

{

$error = theError;

$doc.closeDoc( {bNoSave : true} );

}


I wonder if it is my switch or configurator that having a problem. I'm using Powerswitch 11 update 3 on MAC 0S 10.8.2. I'm using Acrobat 9 because X what not usable because of security issue (Acrobat X told me each time that the application had change probably because the javascript folder).



Any idea?
freddyp
Advanced member
Posts: 413
Joined: Thu Feb 09, 2012 3:53 pm

Problem using command script file of Acrobat configurator

Post by freddyp »

The problem is not related to Switch or the configurator, but to the 32-bit vs. 64-bit setup of the scripting environment on your Mac. Search the internet with your error message about the Adobe Unit Types and you will find several suggested solutions. As I have never had this problem I cannot advise on what solution works best. Please share your experience on the forum.



I have not found what SplitSeqAcroLabel is supposed to do. It is certainly not in the list of the menu items that can be executed in a secure environment.



Another thing I noticed: you close $doc. If you are running the script as a "Save as" script that is fine, but when you are running it as a "Command" script it is not.



Freddy
Post Reply