Class/Properties syntax baffles me
Class/Properties syntax baffles me
- Subject: Class/Properties syntax baffles me
- From: Doug McNutt <email@hidden>
- Date: Sun, 5 May 2002 10:53:48 -0600
I just don't have any more time for searching of the help files. Would someone please short circuit the learning curve for me? What is the "proper" syntax for the simple act of extracting a property from an instance of a class?
From the Interarchy scripting dictionary:
Class window: a window
Properties:
bounds bounding rectangle [r/o] -- the bounds of the window
name string [r/o] -- the name of the window
position point [r/o] -- the position of the top left corner
**
frontwindowrecord: returns the record for the front window
frontwindowrecord
Result: window -- the front window's information
**
-- Interarchy is up and running; this works.
tell application "Luna:Applications:Communication:Interarchy 5.0.1:Interarchy 5.0.1"
frontwindowrecord
end tell
Returning this to the result window:
{name:"FTP Disk Manager", bounds:{48, 451, 544, 603}, position:{48, 451}}
**
What I want is just the name of the window.
Within the tell block I have tried these. Error messages from running the script are after -->
name of frontwindowrecord --> expected expression but found command name.
"name" of frontwindowrecord --> same
get name of frontwindowrecord --> same
get "name" of frontwindowrecord --> same
get the name of frontwindowrecord --> same
get the item named "name" of frontwindowrecord --> same
get the first item of frontwindowrecord --> same
get the text of the item named "name" of frontwindowrecord --> same
name in frontwindowrecord --> same
item 1 of frontwindowrecord --> same (Note that "name" doesn't appear in the line.)
frontwindowrecord:name --> Expected "given", "in", "of" . . . . but found ":"
frontwindowrecord.name --> Unknown token
frontwindowrecord->name --> Naah. That's not even C++
Does the text "command name" in the error message mean that the script processor found some command with a name that it won't identify or does it mean that the word "name" is being taken as a command? A reserved word?
--
--> In Christianity, man can have only one wife. This is known as monotony. <--
_______________________________________________
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.