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: Jon Pugh <email@hidden>
- Date: Wed, 5 Sep 2001 20:55:19 -0700
At 4:44 PM -0400 9/5/2001, Denis G. Marcin, Lazarus Engineering Inc. wrote:
>
but when i "store script" is saves it only as a compiled script. i've
>
read the dictionary entry for "store script" in Scripting Additions but
>
there don't seem to be any options to store the script as a stay-open app
>
like you can from the menu interface.
Perhaps you'll like this trick...
on SaveAsApplet(theScript, theFile)
copyFile (path to me) to file theFile replacing yes
store script theScript in theFile replacing yes
end SaveAsApplet
When run from an applet, it uses itself as a template and uses "store script" to replace the 'scpt' resource with the desired script. As a result you inherit the stay open and splash screen settings from the current applet.
Of course, you have to be running from an applet, but I think you said you wanted to do that. ;)
Jon