Re: Window title of frontmost application
Re: Window title of frontmost application
- Subject: Re: Window title of frontmost application
- From: John Delacour <email@hidden>
- Date: Sat, 26 Apr 2003 00:31:17 +0100
- Mac-eudora-version: 6.0a16
At 2:12 pm -0500 25/4/03, 3 wrote:
That doesn't seem to work for me. I get an execution error with:
"Can't get name of window 1".
If you're talking about a cocoa application, or, to be more specific,
TextEdit, you might want to use 'document'. In almost all
traditional apps, the two are the same in effect and it is possible
in all traditional apps to get the name and other properties of the
windows.
tell application "TextEdit"
{name of document 1, name of window 1}
end tell
--> {"rfc2822.txt", "rfc2822.txt Q /Users/jd/Documents/rfc"}
If you are talking of Mail.app the windows are back to front, so if
you want the name of the front window, ask for the name of the back
window !
tell application "Mail" to get the name of the back window
JD
.
_______________________________________________
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.