At 11:35 PM -0600 11/2/2000, Jacqueline Landman Gay wrote:
>Kevin Miller wrote:
>>
>> On 11/2/00 7:09 am, Mark Talluto <[EMAIL PROTECTED]> wrote:
>>
>> > would love my users to be able to double-click on a saved
>> > file that will open up my app (just like a word pro document would do).
>> > Does anyone know if this is possible on both Mac and Win?
>>
>> Yes, this is possible on both platforms. On Windows, you do what Tereza
>> suggested - reading in the environment variables $0, $1.
>
>Does anyone have an example script they'd be willing to share on how to
>do that on Windows?
This assumes the file association has been set in Windows.
If the double-clicked file is a stack, the standalone will run and
attempt to open the stack. If it's a file you want to read from,
then something like the following should work:
in the standalone:
on preOpenStack
if $1 is not empty then
put url ("file:" & $1) into tData #for example
end if
## continue here
end preOpenStack
But there's a gotcha I think. If the standalone is already open,
double-clicking on an associated file will open a new instance of the
standalone. I remember there was a discussion on this a long time
ago. I can't remember anyone coming up with a way to allow a
double-clicked file to be handled by an already open standalone.
Cheers
Dave Cragg
This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm