Skip the eventual two Finder floating windows [Leopard]
Skip the eventual two Finder floating windows [Leopard]
- Subject: Skip the eventual two Finder floating windows [Leopard]
- From: Emile SCHWARZ <email@hidden>
- Date: Sat, 15 Nov 2008 13:39:09 +0100 (CET)
Hi all,
I have a bunch of script who deals with the front window - under Tiger [10.4.11] - and I get now with Leopard [10.5.5] some error messages: the floating windows _are_ now frontmost!
I have written the script below to be sure that I get the front window _which is not a floating window_ but I have doubts (what can be those doubts ?)
If you (the people in the knowledge) think this script is correct, I will modify it to be a Function who returns the number (2 or 3) of the first non floating window, so I will continue to use my scripts ;)
TIA,
Emile
tell application "Finder"
-- front window is usually window 1
set WindowNbr to 1
--Search the first window who is not a floating window
repeat until floating of window WindowNbr is false
-- Is this a floating window ?
if floating of window WindowNbr is true then
-- Yes, so set a log report
log "WindowNbr value is: " & WindowNbr
-- and update the WindowNbr value
set WindowNbr to WindowNbr + 1
end if
-- exits the loop once I find a non floating window
end repeat
-- report the properties of the window I want
return properties of window WindowNbr
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden