hello from France,
I can find a way to group two identified items on a page. It is certainly very simple but i’ve missed it
However, for a simple thing like this i can’t find anywhere a clear and simple example in the manuals & tutorials.
As i didn’t find a command for telling two page items to be grouped, i have used the “make” command like this:
tell application “Adobe InDesign CS3”
tell document 1
set listItems to the object reference of the page items of page 1
make new group at beginning of page 1 with properties {all page items:{item 1 of listItems, item 5 of listItems}}
end tell
end tell
I also tried other combinations with the make command with no result: at best, i have that error message (roughly translated from french: in parenthesis, i have put my doubts about the translation.):
“needed value is missing for the setting (or property or class?) ‘group items’ of the event (or command ?) ‘make’”
Those someone could help me on this?
nota: however, apart from that little pb, coming from XPress, Applescript support in InDesign is refreshingly powerful and simple to handle 
Model: iMac
AppleScript: 1.10.7
Browser: Safari 523.12.2
Operating System: Mac OS X (10.4)
Salu,
try this
tell application "Adobe InDesign CS3"
tell page 1 of document 1
set listItems to the object reference of the page items
make new group with properties {group items:{item 1 of listItems, item 5 of listItems}}
end tell
end tell
Thank you for your quick reply 
It worked perfectly, great news!
After the halelluyah period, i tried to understand where i was wrong, as your script slightly differ from mine on different points.
Here is what i found for information, if someone have the same problem in the future:
- you put the reference to the page on the tell document line: the two solutions worked well, so it’s not where was the problem.
- you delete the “at beginning” part, but it also worked well if i leave it in place: not the problem either.
- you used the group property “group items” when i used “all page items”: ok, so that was the problem after all.
Now that the problem is in plain sight, what i don’t understand is that i used the property indicated in the applescript library of InDesign CS3 and that the property you used is nowhere present in the scripting documentation.
Likewise, i extracted the properties of the new created group with a light script i use in those circonstances and the property that contain the list of page items of the group is. “all page items”. I confirmed that with a script that extract the list of items in the group: the script works if you use the “all page items” property but returns an error with the “group items” property :lol:
So when you set the group property you must use “group items”, but when you want to make a reference to a group’s page item, it’s the “all page items” property that you have to use
How weird is that?
Does someone has a clue about this problem?
Anyway, again thank you for your help!
Vincent
Model: iMac
AppleScript: 1.10.7
Browser: Safari 523.12.2
Operating System: Mac OS X (10.4)
you’re right, it is weird.
In Script Debugger group items are listed in the Indesign CS 3 dictionary as as a type of Type Names Suite, but not as a property of class group.
It’s also not documented in Abobe’s Indesign CS3 Scripting Guide
I tried the syntax after reading the error message.
Nevertheless all page items and all graphics are read only properties, you can’t set them