File Associations & Auto-Open with OS X

Thierry Arbellot thierry.arbellot at wanadoo.fr
Wed May 11 09:28:28 EDT 2005


Hi Peter,

Add the following handler to the main stack script:

on appleEvent pClass, pID, pSender

   switch pClass & pID
   case "aevtodoc"
     request appleEvent data  -- extract the path of the file to open
-- put here the code to process the file
     break
   default
     pass appleEvent
   end switch

end appleEvent

Regards,
Thierry

On 2005, May 10, , at 23:55, Peter Reid wrote:

> I've got a standalone developed with Rev 2.5.1 that I want to 
> associate with a particular file extension for both OS X and Windows. 
> On both platforms I can specify that all files with the extension 
> ".xyz" is to be opened by a particular program.  This works fine with 
> Windows, but not with OS X (v10.3.9 by the way, in case it's 
> relevant).
>
> In my preOpenStack handler I'm looking at the $0, $1 parameters and 
> find that $1 is set to the name of the file I double-clicked on (.xyz) 
> for Windows but is empty for OS X.  So with OS X when the user 
> double-clicks a .xyz data file, it opens my standalone OK but not the 
> file itself.
>
> Is there a known solution for this for OS X so my users can simply 
> double-click a file to cause it to open my standalone AND THEN the 
> file they clicked on?
>
> Thanks
>
> Peter
> -- 
> Peter Reid
> Reid-IT Limited, Loughborough, Leics., UK
> E-mail: preid at reidit.co.uk
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list