• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Store Script Madness


  • Subject: Re: Store Script Madness
  • From: "Serge Belleudy-d'Espinose" <email@hidden>
  • Date: Fri, 16 Nov 2001 09:38:56 +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 no 'script <string>' construction - at least not in
8.6 which is what I'm on now...

set theNewScript to script "beep 2"
-- Can't get script "beep 2"

My experience is that you can only assign the result of 'run script
<string>' to a variable, and <string> must be a piece of code that
returns a script object:

set theNewScript to run script "script
on _beep()
beep
end on_beep
end"
-- <<script>>

You can then issue the next command

store script theNewScript in file "file path string"

or as Paul said

store script theNewScript in <alias>

and if you open the resulting script, you will find your code without
the 'script/end' lines.


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: because *Ox/it/* contains items that are in use
  • Next by Date: Re: Store Script Madness
  • Previous by thread: Re: Store Script Madness
  • Next by thread: Re: Store Script Madness
  • Index(es):
    • Date
    • Thread