The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > Developer > AppleScripting Omni Apps
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Scripting to work with Lion's full screen window. Thread Tools Search this Thread Display Modes
Traditional references to the 'front window' of Omni apps will now fail on Lion if it is in full screen mode.

The case of OmniFocus has been helpfully dealt with in this post, which suggests:

Code:
tell application "OmniFocus"
    tell first document window of front document
      ...
    end tell
end tell
I think that the following approach should work for OmniGraffle and OmniOutliner in both 10.6 and 10.7 (full screen or otherwise).

Code:
set winOG to GetFrontWin("OGfl")

set winOO3 to GetFrontWin("OOut")


on GetFrontWin(strAppID)
	tell application id strAppID
		if my isFullScreen(strAppID) then
			window 2
		else
			window 1
		end if
	end tell
end GetFrontWin

on isFullScreen(strAppID)
	tell application "Finder" to set blnPreLion to (version < "10.7")
	if blnPreLion then
		return false
	else
		tell application id "sevs"
			set lstApps to application processes where creator type = strAppID
			if length of lstApps < 1 then return false
			set lstWins to windows of first item of lstApps
			if length of lstWins < 1 then return false
			return value of attribute "AXFullScreen" of item 1 of lstWins
		end tell
	end if
end isFullScreen
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How about full screen? sah OmniWeb Feature Requests 0 2012-02-11 05:41 PM
OmniFocus's Quick Entry window in Mail's full screen mode cashdollar OmniFocus 1 for Mac 2 2011-08-02 11:24 AM
Full screen, or at least a big window VicDiesel OmniGraffle General 1 2009-08-19 09:38 AM
Full Screen igsy OmniWeb General 10 2009-04-28 11:52 AM
OmniWeb Full Screen sangheeta OmniWeb General 4 2008-01-04 07:58 PM


All times are GMT -8. The time now is 05:20 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.