Skip to main content
Participating Frequently
February 21, 2021
Answered

Frame From Objects: A script to select multiple objects and insert in (non-existing) frame?

  • February 21, 2021
  • 2 replies
  • 361 views

Often times I need to clip a series of objects to a specific area – I do this by means of a frame.

 

This is my usual flow:

 

1. Select objects

2. Group

3. Cut

4. Draw frame (loosely)

5. Paste into

6. Adjust frame fitting

 

This is obviously fine but I would love to achieve the same thing with just a couple of clicks.

 

I could see this working as something that adds options to the contextual menu whereby the frame itself could be one of the following:

 

  • Size of grouped objects
  • Page size
  • Fit to margins

 

I hope this makes sense! Does anyone know of something similar or perhaps would be willing to write something for me?

 

Thanks in advance

This topic has been closed for replies.
Correct answer Laubender

Brian said: "Adding items to the contextual menu is going to require a plugin."

Hm. Well, no. Also doable by scripting. Dirk Becker had an example where menu item "Apply No Break" was added to the context menu that is offered when you select text.

 

The best source I could find for this today, now that the InDesign Scripting forum was merged with the "normal" InDesign forum, is this:

https://community.adobe.com/t5/indesign/edit-right-click-menu-in-indesign/m-p/10527790#M147117

In the same thread:

https://community.adobe.com/t5/indesign/edit-right-click-menu-in-indesign/m-p/10527785#M147112

Note: The link to Dirk's original code is not working anymore. Sorry. But the main message is:

"$ID/RtMouseText" is the name of the context menu for selected text.

 

Regards,
Uwe Laubender

( ACP )

2 replies

LaubenderCommunity ExpertCorrect answer
Community Expert
February 22, 2021

Brian said: "Adding items to the contextual menu is going to require a plugin."

Hm. Well, no. Also doable by scripting. Dirk Becker had an example where menu item "Apply No Break" was added to the context menu that is offered when you select text.

 

The best source I could find for this today, now that the InDesign Scripting forum was merged with the "normal" InDesign forum, is this:

https://community.adobe.com/t5/indesign/edit-right-click-menu-in-indesign/m-p/10527790#M147117

In the same thread:

https://community.adobe.com/t5/indesign/edit-right-click-menu-in-indesign/m-p/10527785#M147112

Note: The link to Dirk's original code is not working anymore. Sorry. But the main message is:

"$ID/RtMouseText" is the name of the context menu for selected text.

 

Regards,
Uwe Laubender

( ACP )

brian_p_dts
Community Expert
Community Expert
February 22, 2021

Sure, I was misthinking what they meant about context menu. The way they described it sounded like they wanted new items for drawing rectangles in the palette. Thanks for sharing those links.

brian_p_dts
Community Expert
Community Expert
February 22, 2021

Adding items to the contextual menu is going to require a plugin. A script could probably accomplish what you're after just as easily, but it's not exactly trivial. Feel free to DM if you'd like to discuss further.