PDA

View Full Version : Applescript on object


cyleigh
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?

whpalmer4
2011-02-14, 06:46 PM
"self" refers to the object in the script, and id of self will give you the id.

display dialog "My name is " & (name of self as text) & " and my id is " & (id of self as number)

cyleigh
2011-02-14, 06:54 PM
"self" refers to the object in the script, and id of self will give you the id.

display dialog "My name is " & (name of self as text) & " and my id is " & (id of self as number)


Thanks. I was just coming to reply to my own question with this answer! (Note to self: reading the help files leads to information!)