• 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: inculding and reading from files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inculding and reading from files


  • Subject: Re: inculding and reading from files
  • From: JJ <email@hidden>
  • Date: Sat, 15 Jun 2002 09:37:45 +0200

>> Message: 15
>> Date: Thu, 13 Jun 2002 16:24:36 -0700
>> To: email@hidden
>> From: Jon Pugh <email@hidden>
>> Subject: Re: How can I include files in AS
>>
>> At 4:24 PM +0200 6/13/02, Zimba wrote:
>>> I was wondering how I can get a function close to include in order
>>> to load part of scripts... was wondering if it was possible under
>>> AS...
>>
>> Not in AppleScript itself, but Script Debugger
>> <http://www.latenightsw.com/> can do this via script libraries. I
>> love this feature.
>>
> Jon
>
>
> I found a way around by the command load script "url of the compiled
> script", but I can't find how to read from a file... does anyone got
> a tip

Hi, all.

Perhaps I don't understand so much the contents of this question, but you
can "read" from a file with "read" command (Standard Additions). If you wish
"read" a compiled applescript, you then must "load" it (as you found). If
you wish "read" it as a string, you must coerce the loaded script "as
string". Finally, you can "read" a compiled script with the source in the
data fork as script:

set x to read (choose file) as script

JJ
_______________________________________________
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: inculding and reading from files
  • Next by Date: Getting this list item
  • Previous by thread: Re: inculding and reading from files
  • Next by thread: Re: inculding and reading from files
  • Index(es):
    • Date
    • Thread