dropping to the Finder

Richard Gaskin ambassador at fourthworld.com
Fri Feb 26 20:28:33 EST 2010


cubist wrote:

 > Possible solution/workaround for dragging stuff directly to
 > the Finder: Use 'scaffolding' --some sort of tiny (like,
 > 1-byte), invisible file with an exotic/unique name, which
 > has no use in and of itself, but exists to provide a useful
 > side-effect. Drag your 'scaffolding' file to the destination
 > normally. When the 'scaffolding' file is dropped, get its
 > filepath from the Finder; schlep all the *real* files to that
 > location; and (silently) delete the 'scaffolding' file.
 > The big question here is, how to stage-manage the process so
 > that the user is never aware of the 'scaffolding' file and
 > thinks it all
 > Just Works...

With the tempName function making and moving the file would be a snap, 
and snappy.

I think the truly hard part is where you write, "get its filepath from 
the Finder"....

Hmmm...

Actually, since a newly-dropped file becomes the Finder selection, that 
wouldn't be too hard at all with a line of AppleScript.

Now to figure out how I get that info on Win and Linux....

And Björnke, thanks for the tip about the file ID.  I'd forgotten about 
that.  May come in handy if all else fails and I need to look at writing 
an external for this.

--
  Richard Gaskin
  Fourth World
  Rev training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com
  revJournal blog: http://revjournal.com/blog.irv



More information about the Use-livecode mailing list