• 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
Call Method & UID Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Call Method & UID Question


  • Subject: Call Method & UID Question
  • From: Hans Anderson <email@hidden>
  • Date: Sat, 7 Sep 2002 08:37:03 -0500

I am working on a program that uses AppleScript Studio's support of Cocoa UIDs to store its "preferences." I use:

call method "setDefaultObject:forKey:" with parameters {{theValue}, {"theElement"}}

to store variables from my script in its property list file, and I use:

call method "defaultObjectForKey:" with parameter "theElement"

to retrieve the variables. I have only one question: is there a way for my script to check for the existence of its property list file by calling a method (instead attempting something such as):

if exists file "myScriptName.plist" of (path to preferences folder) then 

Otherwise, when the script opens and attempts to retrieve its preferences that have not been previously saved, I get "<VAR> Undefined" errors.

Thank you.
_______________________________________________
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.

  • Prev by Date: Re: Overloading Additions
  • Next by Date: Re: Script Menu wish list
  • Previous by thread: Re: More on URL Access Scripting
  • Next by thread: Sherlock engine
  • Index(es):
    • Date
    • Thread