• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Variables inside handlers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Variables inside handlers


  • Subject: Variables inside handlers
  • From: The Other Rob <email@hidden>
  • Date: Wed, 11 Dec 2002 15:48:41 +1100

Thanks to the help of some generous people on this list, I've worked out the
following bits of scripting.

This script launches my script application called test3app:

ignoring application responses
launch application "OSX:test3app"
run application "OSX:test3app"
tell application "OSX:test3app" to somehandler("$1", "$2", "$3")
end ignoring


And this is the relevant code from test3app:

on somehandler(test1, test2, test3)
-- various lines that do stuff with test1, test2, test3
end somehandler


My problem is that the scope of the variables (test1, test2, test3) is
limited to that particular handler, and I can't access them from other parts
of my test3app script. Is there any way to make these variables available
to the rest of my script?

I've read some Apple documentation which discuss the scope of variables
inside handlers, but it just gives details of the scope. I've also read
some archives from this list without any luck, but I did come across an
amusing thread from March of this year discussing something similar. I'm
sure some of you remember it. :)

Regards,

-Rob
_______________________________________________
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.

  • Follow-Ups:
    • Re: Variables inside handlers
      • From: Ben Waldie (AppleScript Guru) <email@hidden>
    • Re: Variables inside handlers
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Stuck trying to use creatorid to control IE
  • Next by Date: Re: Variables inside handlers
  • Previous by thread: Re: Stuck trying to use creatorid to control IE
  • Next by thread: Re: Variables inside handlers
  • Index(es):
    • Date
    • Thread