• 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: resetting script between runs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resetting script between runs


  • Subject: Re: resetting script between runs
  • From: Håvard Graudo <email@hidden>
  • Date: Mon, 4 Jun 2007 13:51:11 +0200


Den 4. jun. 2007 kl. 13.28 skrev Doug McNutt:

At 11:27 +0200 6/4/07, Richard Mayer wrote:
No, globals are not saved between runs, but maybe you're saving some sort of preference?

I do wish I could get that straight.

I once thought that only properties were saved but other posts on this list lead me to conclude that globals ARE saved, perhaps only if they appear in the main part of a script. I now ALWAYS initialize globals specifically.


I did this earlier today:

--
global gtest

set gtest to 1
display dialog "first: " & gtest
set gtest to gtest + 1
display dialog "second: " & gtest
--

Saving it as an application, it behaves as I would expect: counting 1 and 2 on every single run.
It would indicate globals are not saved, at least the value ignored - as opposed to if it has been declared as a property in the first line.


I am a bit confused about this as I have seen several claims globals are saved.

Håvard




_______________________________________________ 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: 
 >resetting script between runs (From: Håvard Graudo <email@hidden>)
 >Re: resetting script between runs (From: Richard Mayer <email@hidden>)
 >Re: resetting script between runs (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: resetting script between runs
  • Next by Date: Re: resetting script between runs
  • Previous by thread: Re: resetting script between runs
  • Next by thread: Re: resetting script between runs
  • Index(es):
    • Date
    • Thread