Yancka Posted June 3, 2010 Share Posted June 3, 2010 The command can be called using: DoMenuTextByName('Compose',0); Is it possible to call a script from script palette in existing document? For example, in resources of my current file I have Script Palette named "My Scripts" with script in it named "The Magic Button". Is there a way to call "The Magic Button" script from scripts palette "My Scripts" from other script? Quote Link to comment
Pat Stanford Posted June 3, 2010 Share Posted June 3, 2010 You can't call if from a script palette, but you can make it into a menu command, add it to the workspace and call it via a DoMenuTextByName('MyScript',0); command. Use the Vectorscript Plugin Editor (Tools:Scripts) and copy/paste your script code into a new menu command. Quote Link to comment
Yancka Posted June 3, 2010 Author Share Posted June 3, 2010 You can't call if from a script palette Pity. but you can make it into a menu command, add it to the workspace and call it via a DoMenuTextByName('MyScript',0); command. I was already doing that. Thanks, Pat. Quote Link to comment
Yancka Posted June 3, 2010 Author Share Posted June 3, 2010 (edited) Btw, is it possible to create script palette and scripts on it using custom menu command? Edited June 3, 2010 by Yancka Quote Link to comment
Pat Stanford Posted June 3, 2010 Share Posted June 3, 2010 I don't think so. There are not VS commands to manage script palettes as far as I know. If you are on a Mac, you might be able to do with with an Applescript, but you would have to script the GUI (graphical user interface: simulate moving and clicking the mouse). A better use of Applescript would be to import a palette from a library file rather than trying to create it from scratch. But still not easy. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.