Article View: adobe.indesign.sdk
Article #56Exposing plugin to javascript
From: Mike_Marconi
Date: Thu, 12 Mar 2009 21:04
Date: Thu, 12 Mar 2009 21:04
25 lines
1858 bytes
1858 bytes
API = CS4
OS = Mac OS X 10.5
I'm new to Indesign plugin development and was having trouble exposing plugin code to the scripting API. So I went back and created a very basic plugin project using DollyXs. Selected support for Indesign, InCopy and IndesignServer and scripting. Compiled (debug) and installed the plugin in debug builds of Indesign desktop and Indesign server. Wrote a simple javascript to call the app.speak() method that DollyXs creates when the scripting support option is selected.
The app.speak() call works in the Desktop version but on the server version I get "Error String: app.speak is not a function". Looking at the servers "PluginLoadLog.txt" log file the plugin is loading without errors.
In the root fr file I have the following PluginVersion resource;
resource PluginVersion (kSDKDefPluginVersionResourceID)
{
kTargetVersion,
kplgPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kplgCurrentMajorFormatNumber, kplgCurrentMinorFormatNumber,
{ kInDesignProduct, kInDesignServerProduct},
{ kWildFS },
kplgVersion
};
Note: I removed the InCopy ID manually.
Anyone have any ideas as to what the problem may be or can suggest other things to look into?
Thanks Mike
Technical Details
Message-ID:
<59b83245.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f63e9,6d0008542c1f1cf6,start X-Google-Attributes: gidf63e9,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Mike_Marconi@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.indesign.sdk Subject: Exposing plugin to javascript Message-ID: <59b83245.-1@webcrossing.la2eafNXanI> Date: Thu, 12 Mar 2009 14:04:18 -0700 Lines: 35 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit