re: name of target of front window
re: name of target of front window
- Subject: re: name of target of front window
- From: "emile.a.schwarz" <email@hidden>
- Date: Sun, 30 Sep 2012 13:57:18 +0200 (CEST)
Hi Ronald,
you want to know if there is a window open in the Finder ?
if count of window > 0 then
-- There is at last one open window
end if
and do what you have to do with the value (set FWCnt to count of window).
If you want to know if you have a Reporter or a presentation options window ?
if floating of front window then
display dialog "Your guess is correct: this is a floating window"
else
display dialog "Not a floating window"
end if
In fact, use:
return properties of front window
read what you get back (in the Script Editor) and act (code) appropriately ;-)
target of front window returns an alias in the form folderof folderetc. of folder "Users" of startup disk of application "Finder"
you can coerce it to alias:
return target of window 1 as alias
and you will get an alias to the front window. BUT, as you discover it, there are some exceptions (floating windows, search windows, Computer, AirDrop, Network and probably others).
HTH,
Emile
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