Hm, well I may have an error in the modification I tried to make to your code, but this is what I got.
I first tried displaying a dialog, like so:
Code:
on isFullScreen(strAppCode)
try
tell application id "sevs"
set lstApps to application processes where its creator type = "OGfl"
if length of lstApps < 1 then return missing value
tell first item of lstApps
set oWin to missing value
try
set oWin to first window where value of attribute "AXFullScreen" is true
end try
if oWin is not missing value then
display dialog "This is a test" buttons "OK" default button "OK" with title pTitle & " " & pVer
end if
end tell
end tell
on error
return false
end try
end isFullScreen
This was successful. I then replaced the dialog with the "Fit in Window" loop:
Code:
on isFullScreen(strAppCode)
try
tell application id "sevs"
set lstApps to application processes where its creator type = "OGfl"
if length of lstApps < 1 then return missing value
tell first item of lstApps
set oWin to missing value
try
set oWin to first window where value of attribute "AXFullScreen" is true
end try
if oWin is not missing value then
repeat with oCanv in canvases of its document
set canvas of it to oCanv
-- ZOOM TO FIT
tell application id "sevs" to click mnuZoomFit
end repeat
end if
end tell
end tell
on error
return false
end try
end isFullScreen
This didn't seem to do anything. I'd play around more but work calls.
By the way, fullscreen OmniGraffle is something to look forward to if/when you upgrade to Lion. It's a far bigger improvement than I imagined it would be.