Hello,
I’m in need of assistance. I’m trying to understand (newbie here), how to group shapes after they are drawn in PowerPoint. Here’s the script to build the shapes. I’m not understanding how to add them to a group. Appreciate the help here.
(Note I have Powerpoint open with a blank presentation active).
tell application “Microsoft PowerPoint”
set x_position to 15
set y_position to 15
set dia_width to 5
set dia_height to 5
set ms_name to "Hello World"
tell slide 1 of active presentation
set shape1 to make new shape at the end with properties {auto shape type:autoshape rounded rectangle, left position:x_position, top:y_position, width:dia_width, height:dia_height}
set fore color of fill format of shape1 to ({255, 255, 0} as RGB color)
set line weight of line format of shape1 to 0.1
set shape2 to make new shape at the end with properties {auto shape type:autoshape rounded rectangle, left position:x_position + 3.8, top:y_position + 3.8, width:dia_width, height:dia_height}
set fore color of fill format of shape2 to ({255, 0, 0} as RGB color)
set line weight of line format of shape2 to 0.1
set shape3 to make new shape at the end with properties {auto shape type:autoshape rounded rectangle, left position:x_position, top:y_position + 7.6, width:dia_width, height:dia_height}
set fore color of fill format of shape3 to ({0, 176, 80} as RGB color)
set line weight of line format of shape3 to 0.1
set shape4 to make new shape at the end with properties {auto shape type:autoshape rounded rectangle, left position:x_position - 3.8, top:y_position + 3.8, width:dia_width, height:dia_height}
set fore color of fill format of shape4 to ({0, 176, 80} as RGB color)
set line weight of line format of shape4 to 0.1
end tell
end tell
Model: MacBook Pro 15"
AppleScript: 2.5
Browser: Safari 603.2.4
Operating System: Mac OS X (10.10)