• 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
Re: Paths from my Mac, hidden, compiled into my script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Paths from my Mac, hidden, compiled into my script?


  • Subject: Re: Paths from my Mac, hidden, compiled into my script?
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 26 Nov 2013 09:31:13 -0600

On Nov 26, 2013, at 2:01 AM, Paul Berkowitz wrote:

But if you explicitly declare them as local, that shouldn't happen.

True! Any variable used in a run handler is, by default, a global variable.
If you want run handler variables to be local, you have to explicitly declare them,
for example …

on run
local a, b, c, d, e, f

But where in the AppleScript Language Guide is this stated? I've just looked in the most recent pdf and could not find this. I also looked in a very old paperback copy of ASLG and could not find it. (But, I know it's there … somewhere!)

You can also simply avoid the use of any variables in the run handler. Like this ...

on run
try
my main()
on error errText number errNr
if errNr = -128 then
return
else if errNr = -2700 then
my showInstruction(errText)
else
my showError(errText, errNr, false)
end if
end try
end run -------------------------------------------------------




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Paths from my Mac, hidden, compiled into my script? (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: file with most recent modification date
  • Next by Date: Re: AppleScript Reference Library
  • Previous by thread: Re: Paths from my Mac, hidden, compiled into my script?
  • Next by thread: Re: Paths from my Mac, hidden, compiled into my script?
  • Index(es):
    • Date
    • Thread