View Single Post
If you change the font of shape text through the GUI:
  1. Any subsequent scripting will incorrectly report the current font (returning the name of the font in use when the file was last opened).
  2. If the font size is changed by script, the current font will be lost - replaced by the font in use when the file was last opened.

It seems that GUI font changes are only seen by script (and only safe from being lost by script) when the file has been closed and reopened. Simply saving the file is not enough ...

This seems analogous to (perhaps consanguineous with) the Peter Pan abandoned shadow bug.

Code:
tell application id "OGfl"
	tell front window
		set lstSeln to selection
		if length of lstSeln < 1 then return
		set oShape to item 1 of lstSeln
		
		-- FAILS TO REPORTS THE CURRENT FONT ...
		-- (Reports the font in use when file last closed & reopened)
		font of text of oShape
	end tell
end tell

Last edited by RobTrew; 2012-02-09 at 01:41 AM..