Windows of hidden Applications
Windows of hidden Applications
- Subject: Windows of hidden Applications
- From: Irwin Poche <email@hidden>
- Date: Sun, 15 Feb 2004 11:20:28 -0600
I'm developing a script to allow me choose a window from a list of all
windows. I discovered that Applescript was reporting zero windows for
hidden applications. If an application with windows is hidden, it
does not appear in the dialog from this script...
tell application "Finder"
set applList to application processes
set theList to {}
repeat with aAppl in applList
set w to count of windows of aAppl
if w - 0 then
set theList to theList & (name of aAppl & " - " & w)
end if
end repeat
choose from list theList
end tell
I was not so surprised to find that this script returns the correct
window count irrespective of the hidden state of Safari...
tell application "Safari"
count of windows
end tell
...while this script also returns zero when Safari (with windows) is
hidden...
tell application "Finder"
count of windows of (application processes whose name is "Safari")
end tell
I was hoping that this would work, but it too returns zero windows for
hidden applications...
tell application "Finder" to set applList to application processes
repeat with aAppl in applList
tell aAppl to set wList to every window
display dialog (name of aAppl) & ": " & (count of wList)
end repeat
Does anyone tell me what's going on here ?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.