Thursday, October 6, 2022

#1 2005-10-13 03: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

RSS (new topics) RSS (active topics)