Kathe Todd Script to add unnamed colors to the Swatch palette
Jun 18, 2010; 11:39
Kathe Todd
Script to add unnamed colors to the Swatch palette
Finally penetrated a previously unexplored area of the Object Model - the Menus. Ran a loop on the application's Menus collection and wrote it to a text file to get the official names. The official names of each Menu's MenuItems are apparently verbatim as they appear in the panel. This code (in VB.net, syntax in Vbscript or Javascript would be similar or at least they'd both be referencing the same Objects) will run the Add Unnamed Colors command.
Dim myMenu As InDesign.Menu = IDapp.Menus.Item("Swatches Panel Menu") Dim thisItem As InDesign.MenuItem = myMenu.MenuItems.Item("Add Unnamed Colors") Dim myAction As InDesign.MenuAction thisItem.AssociatedMenuAction myAction.Invoke()
Kathe Todd
Audio Editions
kathe-t@audioeditions.com
-----Original Message----- From: InDesign Talk [mailto:indesign@lists.lassosoft.com] On Behalf Of William Adams Sent: Tuesday, June 15, 2010 11:39 AM To: InDesign Talk Subject: [SPF - SPAM] - Re: [SPF - SPAM] - Re: Script to add unnamed colors to the Swatch palette?
On Jun 15, 2010, at 2:27 PM, Robert Severn wrote:
> Pick swatch. Done. That's different to "selecting "New Color Swatch'', changing Color Mode: to Pantone Solid Coated, selecting the desired color and clicking OK (or Add". About 3 operations different.
Only if one is willing to sacrifice the screen real estate to the Pantone Solid Coated library.
If not, it's:
Window Swatch Libraries Color Books Pantone Solid Coated
then find the color
then fly-out menu Add to Swatches (or double-click)
I'll grant that it would be nice if ``New Color Swatch'' wasn't a modal dialog, but since I always have to summon up the Pantone Solid Coated library palette, it's faster for me in InDesign (and there I don't have to switch away from the ridiculous tiny rectangle view)
William
-- William Adams senior graphic designer Fry Communications Sphinx of black quartz, judge my vow.
-- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/InDesign/Browse/ Manage your subscription: http://www.ListSearch.com/InDesign/
-- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/InDesign/Browse/ Manage your subscription: http://www.ListSearch.com/InDesign/
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!