• 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: referencing stuff in other files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: referencing stuff in other files


  • Subject: Re: referencing stuff in other files
  • From: kai <email@hidden>
  • Date: Sat, 25 Feb 2006 16:59:40 +0000


On 25 Feb 2006, at 16:05, Mr Tea wrote:

This from Jeremy Matthews - dated 25/2/06 13.59:

Is there a way you can reference an item/list string, or other errata
in another file (perhaps, an applescript file?).

What you probably want here is the 'file read/write' commands from the 'standard additions' osax provided with AppleScript.

A simple script for reading the contents of a text file might look like
this:


  set f to "Diskname:Foldername:Filename"
  open for access file f
  set filecontents to read file f
  close access file f

Or simpler still:

----------
read file "Diskname:Foldername:Filename"
----------

If the item required is a script property, then something like this should do the trick:

----------
myProperty of (load script file "Diskname:Foldername:Scriptname")
----------

(Where 'myProperty' is the label of the property required.)

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: referencing stuff in other files (From: Mr Tea <email@hidden>)

  • Prev by Date: Christian Vick NDNs
  • Next by Date: Re: Christian Vick NDNs
  • Previous by thread: Re: referencing stuff in other files
  • Next by thread: auto-update
  • Index(es):
    • Date
    • Thread