• 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: Store Script Madness (second try at posting)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Store Script Madness (second try at posting)


  • Subject: Re: Store Script Madness (second try at posting)
  • From: "Serge Belleudy-d'Espinose" <email@hidden>
  • Date: Fri, 16 Nov 2001 11:47:49 +0100

At 21:57 -0600 15/11/01, AppleScript Greg wrote:

> >> store script theNewScript in file (newScript)
> >>
> >> Gives me an error ("Can't make some data into the expected type.") and I
> >> swear I can't figure it out. I even stripped it down to theNewScript to
> >> "beep 2".

AFAIK there is not 'script <string>' construction; the following line
errors on my machines - 8.6 to 9.1:

set theNewScript to script "beep"

In my experience the only way to create a script object is to use the
following construct:

set theNewScript to run script "script
on _beep()
beep
end _beep
end script"

where you get the result of run script which, in this case, returns a
script object. Then you can use your command:

store script theNewScript in file (newScript)

provided that you take care of the problem Paul mentionned. If you
open the resulting script, you will find your code excepted for the
first and last lines 'script/end script'.


Serge
--
\\//\//\// Serge Belleudy-d'Espinose Institut Jacques Monod
// // // http://www.ijm.jussieu.fr/ Universite Paris VII - Jussieu
//\//\//\\


References: 
 >Re: Store Script Madness (From: AppleScript Greg <email@hidden>)

  • Prev by Date: Re: Store Script Madness
  • Next by Date: Looks like DTI has a little problem
  • Previous by thread: Re: Store Script Madness
  • Next by thread: Re: Store Script Madness
  • Index(es):
    • Date
    • Thread