• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [AS] Getting some Finder windows properties under 10.4.6...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AS] Getting some Finder windows properties under 10.4.6...


  • Subject: Re: [AS] Getting some Finder windows properties under 10.4.6...
  • From: kai <email@hidden>
  • Date: Mon, 24 Apr 2006 05:43:53 +0100


On 20 Apr 2006, at 10:31, Emile Schwarz wrote:

[some code snipped]

tell application "Finder"
	set wNames to name of every window
end tell

and I was foolishly thinking that I will get all Finder Open Windows...

Did I told you that I had the Get Info window and the "Présentation options" window ?
[no ? sorry; now you know]

Your statement should return the name of all windows open in Finder, Emile - apart from the (ever-present) desktop window and the (floating) Présentation/View Options window. In other words, you should get the name of any open Finder windows, information windows and clipping windows. If open, Finder's Preferences window and/or Clipboard window should also be included.


To include the Présentation/View Options window (which is visible only when Finder is frontmost):

----------------
tell application "Finder"
	activate
	set wNames to name of every window
end tell
----------------

Only the 'window', 'Finder window' and 'clipping window' classes appear to have a plural form. And since 'clipboard' (Finder’s clipboard window) and 'clipping window' are evidently not yet available, some kind of workaround is needed when filtering.

So to isolate a specific window class:

--------------------
-- Finder windows:
--------------------
tell application "Finder"
	name of Finder windows
end tell

--------------------
-- information windows:
--------------------
tell application "Finder" to try
	name of windows whose class is information window
end try

--------------------
-- clipping windows:
--------------------
tell application "Finder" to try
name of windows whose class is window and name is not "Presse-papiers"
(* or: ... not in {"Clipboard", "Presse-papiers", "Zwischenablage", "Portapapeles", ¬
"Área de Transferência", "Appunti", "Klembord", "Utklipp", "Urklipp", ¬
"Udklipsholder", "Leikepöytä"} etc... *)
end try


--------------------
-- preferences window
--------------------
tell application "Finder" to try
	properties of first window whose class is preferences window
end try

--------------------
-- clipboard window
--------------------
tell application "Finder" to try
properties of first window whose class is window and name is "Presse- papiers"
(* or: ... in {"Clipboard", "Presse-papiers", "Zwischenablage", "Portapapeles", ¬
"Área de Transferência", "Appunti", "Klembord", "Utklipp", "Urklipp", ¬
"Udklipsholder", "Leikepöytä"} etc... *)
end try


--------------------
-- desktop window
--------------------
tell application "Finder"
	properties of desktop's window
end tell

--------------------
-- view options window
--------------------
tell application "Finder" to try
	activate
	properties of first window where it is floating
end try

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >[AS] Getting some Finder windows properties under 10.4.6... (From: Emile Schwarz <email@hidden>)

  • Prev by Date: Re: QuarkXPress - delimit table defaults?
  • Next by Date: Re: Why do I get this error?
  • Previous by thread: Re: [AS] Getting some Finder windows properties under 10.4.6...
  • Next by thread: check if folder exists in symbolic linked dir
  • Index(es):
    • Date
    • Thread