Tuesday, April 25, 2017

#1 2005-10-13 04:03:19 pm

From: Malasaña, Madrid
Registered: 2002-11-20
Posts: 2014

How can I call a handler from within an application tell block?

Some times, when you call one of your handlers within a â??tell blockâ?, it will be redirected to the targeted application and it will try to execute it as part of its commands; so, this will throw an error. To execute your handler, you will need to add an of me reference following your handler call (or use the possesive my). For example:


tell application "Finder"
   -- Do Stuff
   myHandler() of me
   my ownHandler()
end tell

Filed under: Finder



Board footer

Powered by FluxBB

[ Generated in 0.050 seconds, 8 queries executed ]

RSS (new topics) RSS (active topics)