Desktop Drag&Drop files
    Ben Rubinstein 
    benr_mc at cogapp.com
       
    Thu Nov 29 08:54:14 EST 2001
    
    
  
on 29/11/01 2:40 AM, Alex Shaw at A.Shaw at mailbox.gu.edu.au wrote:
> For windows.. it is easy .. compile your exe
> 
> Dropped files are accessed via the global variables $0 - app name/path; $1
> - dropped file 1; etc
> (see Help - Concepts & Techniques - The Outside World)
> 
> So to access the full path to the first file dropped onto the app:
> put $1 into it
> 
> On windows it didn't matter what sort of file was dropped.. it accepted
> everything .. files & folders. It then becomes a simple task of processing
> each variable $1 -> $n (n - the last file).
Thanks Alex!  I'll look forward to trying this out.
Do you get any kind of message about this happening when your app is already
running?  ie how do you know, apart from at startup, when to examine the
environment variables?
PS - Jeanne, are you reading this?  I couldn't find any docs in Rev about
how to read environment variables - and I guess also that this (how to make
an app respond to files dropped or launched; on all platforms; including how
to set file affiliations on the Mac) would make a useful encyclopedia topic.
  Ben Rubinstein               |  Email: benr_mc at cogapp.com
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866
    
    
More information about the metacard
mailing list