If I attach a script to an object, is there a quick way that I can get the id of that object when the script is running?
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!
|
|
FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
Applescript on object | Thread Tools | Search this Thread | Display Modes |
Member
2011-02-14, 04:44 PM
If I attach a script to an object, is there a quick way that I can get the id of that object when the script is running?
Post 1
|
Member
2011-02-14, 06:46 PM
"self" refers to the object in the script, and id of self will give you the id.
Code:
display dialog "My name is " & (name of self as text) & " and my id is " & (id of self as number)
Post 2
|
Member
2011-02-14, 06:54 PM
Thanks. I was just coming to reply to my own question with this answer! (Note to self: reading the help files leads to information!)
Post 3
|
Thread Tools | Search this Thread |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AppleScript: Populate table with notes & values of an object | Macintosh | OmniGraffle General | 0 | 2011-01-17 06:22 AM |
Several instances of the same object? | BippedyDooDah | OmniGraffle General | 2 | 2009-10-30 10:09 AM |
Creating a new object | dlawrence | OmniGraffle General | 3 | 2009-08-09 12:18 PM |
Selecting one object behind another object | grewt | OmniGraffle General | 2 | 2008-06-16 11:43 AM |
Snap to object | link | OmniGraffle General | 0 | 2008-01-18 10:56 AM |