AXPosition and AXSize

I’m working with the Screen Sharing app, which is for the most part not scriptable, and trying to move its windows around using System Event. The dictionary says that the values of AXPosition and AXSize are “settable” but they don’t respond to my script. Any suggestions?

tell application "System Events"
tell its application process "Screen Sharing"
	tell its window 3
		set value of attribute "AXPosition" to {100, 100}
		tell its attribute "AXSize"
			set its value to {300, 600}
		end tell
	end tell
end tell

end tell

Hi Ed,

When I requested properties of window 3, I got quite a list. Based on that result, I tried the following, which seems to work here:

tell application "System Events"
   tell its application process "Screen Sharing"
      tell its window 3
         set position to {100, 100}
         set size to {300, 600}
      end tell
   end tell
end tell

I hope that works for you.

Stan C.

Thanks, Stan, that did the trick!