opening files created by my app

Jan Schenkel janschenkel at yahoo.com
Thu Jun 30 17:56:41 EDT 2005


--- Langers Christian <christian.langers at education.lu>
wrote:
> Ok,
> 
> i found the answer on Ken Ray's pages : "Setting
> Document  
> Associations in Windows"
> 
> So, I'll try that... Only one question : what
> application is needed  
> to create these entries ? Command Line or the
> registry editor or .... ?
> 
> Christian
> 

Hi Christian,

You can leave that up to the installer application, or
use the 'setRegistry' and 'getRegistry' commands and
functions the first time your application is started.

As for actually opening the files on double-click:
Windows will open a new copy of your application, and
the path to the file will be in the $1 global
variable.
In my apps, I handle this in the 'openStack' message
of my mainStack.
--
on openStack
  -- other initialisation stuff
  ...
  -- see if we were opened with a file
  put $1 into tFilePath
  if tFilePath is not empty then
    -- handle opening the file
  end if
end openStack
--

Hope this helped,

Jan Schenkel.

Quartam - Tools for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


		
__________________________________ 
Discover Yahoo! 
Have fun online with music videos, cool games, IM and more. Check it out! 
http://discover.yahoo.com/online.html



More information about the use-livecode mailing list