Re: Export as script
Re: Export as script
- Subject: Re: Export as script
- From: "Jason W. Bruce" <email@hidden>
- Date: Sat, 18 Nov 2000 10:28:27 -0600
Greg ,
Must this text input be saved as a compiled script or do you just need it
for subsequent execution? If you only need it for subsequent execution,
you could allow it to exist as a plain file containing syntactically correct
AppleScript and then compile it on the fly using run script. So, when you
need to retrieve the text input after writing it out,
set outScript to read file alias "Hard drive:outscriptfile"
run script outScript
-- or you could use the store script command to save outscript to a
pre-existing script file. Or am I misunderstanding what you wish to do.
Jason Bruce
----------
>
Message: 4
>
Date: Fri, 17 Nov 2000 20:11:11 +0000
>
Subject: Export as script
>
From: Greg Strange <email@hidden>
>
To: AppleScript <email@hidden>
>
>
Hello all,
>
>
Can anyone direct me to some info about exporting text as a compiled
>
AppleScript? I want to take a sceries of text inputs and put them into a
>
completely separate script. So for instance,
>
>
set outScript to "tell application \"Finder\"" & return & "display dialog
>
\"Hello World!\"" & return & "end tell"
>
>
open for access file "outScriptFile" with write permission
>
write outScript to file "outScriptFile"
>
close access file "outScriptfile"
>
>
I have tried changing the file and creator types to a compiled script but
>
when I try and launch it, it fires off another script on the desktop.
>
>
Anyone have any ideas?
>
>
Greg Strange
>
--
>
If you liked WKRP, you'll hate Mouthful of Liquor.
>
Not for the faint of smart,
>
www.mouthfullofliquor.com