drag and drop image import?

Chipp Walters chipp at chipp.com
Tue Sep 6 16:17:03 CDT 2005


Try this:

Create a blank image object on your stack. Set the lockLoc of it to 
true. Set it's script:

on dragenter
   set the acceptdrop to true
end dragenter

on dragDrop
   get the dragdata
   if it is not empty then
     put it into tFile
     if char -4 to -1 it is ".jpg" then
       set the filename of me to it
     end if	
   end if
end dragDrop

That should get you started :-)

best,

Chipp


Eric Engle wrote:
> I would like to be able to drag an image to a metacard stack, drop the image,
> and have the stack recognize it as an image and import it. 
> 
> I have no idea the properties if that is even possible, I sort of doubt it. I
> could script opening a directory and importing the image no problem, or even a
> whole folder of images. But what I've not yet figured out is whether there is
> any way to poll the cursor for dragged images (on any platform).
> 
> Ideas?
> 
> 
> 	
> 		
> ______________________________________________________
> Click here to donate to the Hurricane Katrina relief effort.
> http://store.yahoo.com/redcross-donate3/
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
> 
> 



More information about the metacard mailing list