Hi
I am trying to run a script when my InDesign plugin is loaded. I referred to the PanelTreeView sdk sample as an example and implemented a StartupShutdown Boss
In my implementation, in the startup() method I have the code to get the scriptManager and the scriptRunner for my javascript that I want to run. However, when my code hits the following line :
InterfacePtr<IScriptRunner>theRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFile) ); //scriptfile is ID script file that I want to run
I get the error saying "Calling ScriptInfoDatabase::InitScriptInfoManager before resources have been registered".
I am wondering how I can fix this error. or if this is too early to invoke scriptrunner, then is there some other place where I can invoke the scriptrunner to run my script
this is how I have defined my StartupShutdown Boss class in the .fr file
Class
{
kmyStartupShutdownBoss,
kInvalidClass,
{
/** Implementation of IStartupShutdownService that runs a scripts on startup */
IID_IAPPSTARTUPSHUTDOWN, kmyStartupShutdownImpl,
/** identify the service type */
IID_IK2SERVICEPROVIDER, kCStartupShutdownProviderImpl,
}
},
Appreciate any help on this one .. thanks!
Sameer