• 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: Script on the fly?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script on the fly?


  • Subject: Re: Script on the fly?
  • From: "Serge Belleudy-d'Espinose" <email@hidden>
  • Date: Mon, 5 Nov 2001 21:22:31 +0100

Ok ok, I must say I was too quick at telling The World what I thought I was the only one to know. So much for the fame :)
However, it took me a while to figure out why what works for Has doesn't for Arthur J Knapp - and me...

At 12:32 -0500 5/11/01, Arthur J Knapp wrote:

> set header to "script returnCompiledScript" & return
> set tailer to "end script"
>
> set a_compiled_script to run script (header & theScriptText & tailer)

As I said before, this doesn't work.

At 18:39 +0000 5/11/01, has wrote:

>set theScript to "
>on beepme(n)
>beep n
>end beepme
>"--i.e. your script as text
>
>run script "script x
>" & theScript & "
>end script
>x"

but this does. So what's the difference? It's in the way the script text is assembled. Arthur starts with

script returnCompiledScript

and ends with

end

while Has starts with

script x

and ends with

end
x

The difference is that if you start with 'script <anyname>', you have to let the last line be '<anyname>' after 'end script' or nothing will be returned.
Or you can start with 'script' and end with 'end script' which, surprise surprise, also returns the script without having to mention it.

Ok, I'm not the first one to find out the compile on the fly thing but at least, I found out by myself :)

Thanks to Has and Arthur anyway.


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


References: 
 >Re: Script on the fly? (From: Arthur J Knapp <email@hidden>)

  • Prev by Date: Re: iTunes 'current playlist'
  • Next by Date: RE: SoundJam had it first (was Re: iTunes coupe)
  • Previous by thread: Re: Script on the fly? - solved
  • Next by thread: Re: Script on the fly?
  • Index(es):
    • Date
    • Thread