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

Re: Export as script


  • Subject: Re: Export as script
  • From: Richard 23 <email@hidden>
  • Date: Fri, 17 Nov 2000 23:06:17 -0800

>But how do you "launch" your compiled scripts? I don't know how to save it
>as an applet. (Simply getting the Finder to change its creator type to
>"aplt" and file type to "APPL" and double-clicking it results in some other
>applet on my hard disk running.) It runs fine from OSA menu or any
>application's internal script menu. Or I can load it and run it easily. I
>hope you're not trying to tell a compiled script to "launch"?


If I'm understanding you correctly there's no way that would work.

A compiled script is not an application. It contains a compiled script,
your description text and some window settings, but no runtime code.

Simply changing a compiled script to an applet via creator and type codes
will work no more than setting your browser's codes to a text document in
an attempt to read the source code, or turning a boring read me into a gif
picture to view it in a more colorful way.

R23

Maybe this might be what you're trying to do:

**********

script outScript
property parent: AppleScript

tell application "Finder"
display dialog "Hello World!"
end tell
end script

set filePath to (path to startup disk as string) & "test"
store script outScript in file filePath

set theObj to load script file filePath
run theObj

tell app "Script Editor" to open file filePath

**********

By the way, defining a parent property in the script object as
AppleScript severs the ties between the script object and the
containing script.

If you did the same thing from a really big script, leaving out
the parent property, you'd end up with a big script file, far too
big for the one or two lines that you may think you were saving!

R23


  • Follow-Ups:
    • Re: Export as script
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Smile - new window with properties [and a tip]
  • Next by Date: Re: Export as script
  • Previous by thread: Re: Export as script
  • Next by thread: Re: Export as script
  • Index(es):
    • Date
    • Thread