🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
5 messages
5 total messages Started by Skempy Fri, 13 Feb 2009 13:14
[CS3 JS] Positioning items in menus
#1264
Author: Skempy
Date: Fri, 13 Feb 2009 13:14
12 lines
840 bytes
Hi,

I can add items to menus but do not know how to control their position.

var myMenuSeparator1 = myFileMenu.menuSeparators.add();
   var myScriptMenuItem3 = myFileMenu.menuItems.add(myScriptAction3);

How do I put my menu items where I want.

Thanks

Simon Kemp
Re: [CS3 JS] Positioning items in menus
#1265
Author: Kasyan_Servetsky
Date: Fri, 13 Feb 2009 13:55
5 lines
846 bytes

var myScriptMenuItem3 = myFileMenu.menuItems.add(myScriptAction3, LocationOptions.AFTER, SomeScriptMenuItem);

LocationOptions can be: BEFORE/AFTER some menu item, AT_BEGINNING/AT_END of the containing object (submenu).
Re: [CS3 JS] Positioning items in menus
#1267
Author: Skempy
Date: Fri, 13 Feb 2009 14:19
17 lines
1079 bytes
Thanks,

This helps a bit.

What do I use for "SomeScriptMenuItem".

I have tried...

var myScriptMenuItem3 = myFileMenu.menuItems.add(myScriptAction3, LocationOptions.AFTER, "User...");

var myScriptMenuItem3 = myFileMenu.menuItems.add(myScriptAction3, LocationOptions.AFTER, User);

var myScriptMenuItem3 = myFileMenu.menuItems.add(myScriptAction3, LocationOptions.AFTER, 24);

I want my menu item to appear after "User..." in the file menu.

Thanks
Re: [CS3 JS] Positioning items in menus
#1270
Author: Kasyan_Servetsky
Date: Fri, 13 Feb 2009 14:38
3 lines
813 bytes
SomeScriptMenuItem is a variable referencing to some menu item.
e.g.
var SomeScriptMenuItem = app.menus.item("$ID/Main").submenus.item("File").menuItems.item("User...");
Re: [CS3 JS] Positioning items in menus
#1271
Author: Skempy
Date: Fri, 13 Feb 2009 15:01
9 lines
922 bytes
That did the trick.

Thank you very much for sharing your time and knowledge.

I am reluctant to ask for help on this forum until I have attemted to find the solution using the Adobe scripting publications - in this case, the menu scripting section was far too complicated for me.

Thanks again.

Simon
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads