Thanks for the reply but when I try your revision I get the following error: Adobe InDesign CS4 got an error: Invalid value for set property ‘selection’. Expected list of objects, object or nothing, but received nothing.
That doesn’t make sense because I selected a rectangle that has an image pasted into it. I ran a get properties for myFrame and it returned the following:
get properties of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”
→ {triggered from script:false, nested in script:false, component id:“”, display error dialogs:false, demo days left:2.147483647E+9, is demo:false, event code:“”, event filter:“”, java script:“”, observers:{scripted plugin id 376 of document “Untitled-2”}, subject script tag filter:“”, subjects:{}, use debugger:false, absolute rotation angle:0.0, absolute horizontal scale:100.0, absolute shear angle:0.0, absolute vertical scale:100.0, id:311, overridden:false, flip:none, associated XML element:nothing, all graphics:{PostScript picture id 315 of rectangle id 312 of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”}, all page items:{rectangle id 312 of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”}, applied object style:object style id 117 of document “Untitled-2”, content type:graphic type, end cap:butt end cap, end join:miter end join, fill tint:-1.0, fill color:color id 11 of document “Untitled-2”, absolute flip:none, gap color:swatch id 14 of document “Untitled-2”, gap tint:-1.0, geometric bounds:{3.905555555556, 0.625, 6.794444444444, 5.8125}, InCopy export options:InCopy export options of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”, rotation angle:0.0, lock state:none, stroke tint:-1.0, left line end:none, stroke color:swatch id 14 of document “Untitled-2”, stroke weight:0.0, miter limit:4.0, nonprinting:false, overprint fill:false, overridden master page item:nothing, anchored object settings:anchored object settings of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”, frame fitting options:frame fitting options of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”, local display setting:default, shear angle:0.0, parent:page id 275 of spread id 270 of document “Untitled-2”, corner option:none, corner radius:0.166666666667, gradient fill angle:0.0, gradient fill length:0.0, gradient stroke angle:0.0, gradient stroke length:0.0, gradient stroke start:{-0.8125, 7.461111111111}, gradient fill start:{-0.8125, 7.461111111111}, horizontal scale:100.0, index:2, item layer:layer id 262 of document “Untitled-2”, locked:false, object reference:rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”, label:“”, vertical scale:100.0, right line end:none, story title:“”, stroke alignment:center alignment, stroke type:stroke style id 23081 of document “Untitled-2”, text wrap preferences:text wrap preferences of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”, visible bounds:{3.905555555556, 0.625, 6.794444444444, 5.8125}, content transparency settings:content transparency settings of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”, fill transparency settings:fill transparency settings of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”, transparency settings:transparency settings of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”, stroke transparency settings:stroke transparency settings of rectangle id 311 of page id 275 of spread id 270 of document “Untitled-2”}
Sorry for the gobbledy gook, but I thought it may help. The image inside the rectangle is a postscript image (not sure that means anything). Thanks for your help!