• 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: run-only applets/droplets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: run-only applets/droplets


  • Subject: Re: run-only applets/droplets
  • From: John W Baxter <email@hidden>
  • Date: Wed, 7 Feb 2001 00:54:00 -0800

At 21:05 -0500 2/6/01, Daniel Robinson wrote:
>I made a little three-line script and saved it as a compled script, an
>applet, and a run-only applet.
>
>-----
> -- This is a comment
>
> set TheText to "This is a string."
> display dialog TheText
>-----
>
>I opened all three in Res-Edit.
>
>1. The 'meat' appears to be stored in the "scpt" resource.
>2. The scpt in the applet and the compiled script were identical.
>3. Except for the scpt resource, both applets were identical and
> contained additional 'app stuff' like "icons," "fonds," and
> the like.
>4. There were snippets of recognizable text in the script and the
> applet, followed by a section (probably) containing the
> compiled code.
>5. The scpt in the run-only applet was half the size of the other
> two, containing only the latter, compiled section.
>
>Therefore one might assume the missing part in the run-only applet is the
>editable version of the script.
>

One might expect that, but as it is stated above one would be wrong. The
editable version of the script isn't stored anywhere. Enough information
is stored so that AppleScript can reproduce the source code when some
application asks for it. Some information about alternatives is stored
(AppleScript keeps track of whether a particular test is coded as
is less than or equal to
<=
[option-,]...US keyboards...evading the character munger software
and any other valid forms

But not always:
tell app "Finder"
will decompile as
tell application "Finder"
and, as has been noted elsewhere recently, line continuation characters get
moved around mercilessly.

And of course comment text is stored.

--John
From a favorite telly series: "You might very well think that, but as for
me, I couldn't possibly comment."
--
John Baxter email@hidden Port Ludlow, WA, USA


References: 
 >Re: run-only applets/droplets (From: Daniel Robinson <email@hidden>)

  • Prev by Date: Re: Metamorphosax! (revisited)
  • Next by Date: Re: Scripting aids
  • Previous by thread: Re: run-only applets/droplets
  • Next by thread: Re: Dynamic Handlers. Not?
  • Index(es):
    • Date
    • Thread