Initiating a script from a created menu
Ok,
I admit that I am a novice with JavaScript, although I have experience developing using Xcode with ObjC and lots of interapplication scripting with AppleScript.
However, I am clearly missing some very basic concepts trying to do some very simple things to script Adobe Bridge.
For instance, I have followed the tutorials and have had no problem running and customizing versions of SnpAddMenuItem.jsx and SnpCreateThumbnailInspector.jsx.
Now, let's say I put the SnpAddMenuItem.jsx in the Startup Scripts folder for Bridge CS6. (works fine and creates menu on launch.)
However, instead of displaying an alert, as in the demo:
alertCommand.onSelect = function (m)
{
var txt = m.text;
// Display result as UI, as this is UI sample
alert("'" + txt + "' was chosen menu item");
// run javascript
//SnpCreateThumbInspectorPanel.Main();
}
I want to run SnpCreateThumbnailInspector.jsx.
Do I:
- Call the script by referencing it's location on disk
- Include the CreatThumbnailInspector code as a function in the AddMenuItem script and direct function.OnSelect to run that function
- Or is there some other method that I am totally missing?
I have scoured the documentation and much of the sample scripts and can't seem to figure out this seemingly simple concept.
- James
