• 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: Script Object Property Persistence
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script Object Property Persistence


  • Subject: Re: Script Object Property Persistence
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 23 Sep 2002 08:58:51 -0700

On 9/23/02 8:15 AM, "ken" <email@hidden> wrote:

> What I have is a script called "CatalogAssets" which has the
> following in it:
>
> -- *** begin CatalogAssets script sample
>
> property scratchDisk:""
>
> catalogAssestsMain()
> -- thisDiskName is a string the user has already defined
> set scratchDisk to thisDiskName
> end catalogAssestsMain
>
> -- *** end CatalogAssets script sample
>
> Naturally, there is much more to it than this, but this is all that's
> relevant. Now, this script is saved on disk and called from another
> script in this manner:
>
> set catalogAssets to load script alias (**path to the saved script
> object**)
> catalogAssestsMain() of catalogAssets
>
> This will correctly load the script and run the handler, but the
> property scratchDisk resets to "" every time I run the script. What do
> I have to do to get the property scratchDisk to hold it's value
> between runs?

You have to store it.

store script catalogAssets in alias (**path to the saved script
object**) replacing yes

'store script' is also in Standard Additions dictionary, just below 'load
script'. Danny Goodman is very good on this stuff. Until you save it in the
script file, you've just been working with an instance of the script in
memory.

--
Paul Berkowitz
_______________________________________________
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:
    • Getting Past the OS X Screen Saver Login
      • From: Gary Beberman <email@hidden>
References: 
 >Script Object Property Persistence (From: "ken " <email@hidden>)

  • Prev by Date: Auto login to novell
  • Next by Date: Re: Mail attachment
  • Previous by thread: Script Object Property Persistence
  • Next by thread: Getting Past the OS X Screen Saver Login
  • Index(es):
    • Date
    • Thread