Re: can i 'store script' as stay open applet?
Re: can i 'store script' as stay open applet?
- Subject: Re: can i 'store script' as stay open applet?
- From: "Bob.Kalbaugh" <email@hidden>
- Date: Wed, 05 Sep 2001 20:20:05 -0500
on 9/5/01 6:29 PM, Christopher Nebel at email@hidden wrote:
>
On Wednesday, September 5, 2001, at 12:48 PM, Denis G. Marcin, Lazarus
>
Engineering Inc. wrote:
>
>
> can i from within one script create, store and eventually trigger
>
> stay-open classic applets?
this could be the makings of a great thread. _bk
>
>
You should be able to cheat. An applet is really a compiled script with
>
a different file type and a bunch of extra resources (a little
>
executable code, icons, and some application-related goo.)
>
>
What you do is create a stay-open classic applet that has some trivial
>
script in it. When you want to create a new applet, duplicate the
>
skeleton to where you want it and then "store script" into it. Voila!
>
(Disclaimer: I've never actually tried this, but it should work.)
>
>
>
--Chris Nebel
>
AppleScript Engineering
I was just about ready to post the following:
dear denis,
If you want to have a little dangerous fun...
create a dummy script with the line... beep 2 or something like that
save it as an stay open applet to your desktop and call it "ShellApp" then
play with this script from the script editor.
set appPath to "HD:Desktop Folder:shellApp"
set thePath to "HD:"
tell application "Finder"
duplicate file appPath to startup disk with replacing
set name of result to "My New App"
set theNewApp to (thePath & "My New App") as text
end tell
script newScript
on ddialog(theMsg)
beep 2
display dialog theMsg
end ddialog
end script
store script newScript in file theNewApp with replacing
set theMsg to "I'm Working..."
tell application theNewApp to activate
tell application theNewApp to ddialog(theMsg)
tell application theNewApp to quit
have fun!
--
bob.kalbaugh