Drag-drop image onto app icon?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 346
- Joined: Mon Mar 01, 2010 7:13 pm
- Location: London, UK
- Contact:
Drag-drop image onto app icon?
I have drag and drop working fine for dropping an image into an object in my stack. But is it possible to set things up so I can drag-drop an image onto my standalone icon in the Dock (I'm on a Mac) and have it work just the same?
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
Re: Drag-drop image onto app icon?
Hi Keith,
as far as I remember you need to catch -> on appleEvent
See the dictionary for further infoand an example.
And you may need to modify the pList to include one or more image formats in the list of formats that your app can handle. If not you need to press the ALT and CMD key when dragging an image on your dock icon to "force" the apple event.
Best
Klaus
as far as I remember you need to catch -> on appleEvent
See the dictionary for further infoand an example.
And you may need to modify the pList to include one or more image formats in the list of formats that your app can handle. If not you need to press the ALT and CMD key when dragging an image on your dock icon to "force" the apple event.
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 190
- Joined: Sat Apr 08, 2006 7:55 am
- Location: Lübbecke, Germany
- Contact:
Re: Drag-drop image onto app icon?
This is an example script how it will work with the standalone under Mac OS.
Put the following script into the stack script and adjust it to your needs.
Put the following script into the stack script and adjust it to your needs.
Code: Select all
on appleEvent pClass, pEventID, pSender
if pClass is "aevt" and pEventID = "odoc" then
## This is an apple event
## We request the data about the apple event
request appleEvent data
put it into tFileName
## now do whatever you want....
## in this example i am sending upload + the complete path of the dragged file to the card Main.
send "uploadFile tFilename,tStartup" to card "Main" in 50 milliseconds
end if
pass appleEvent
end appleEvent
-
- VIP Livecode Opensource Backer
- Posts: 346
- Joined: Mon Mar 01, 2010 7:13 pm
- Location: London, UK
- Contact:
Re: Drag-drop image onto app icon?
Reviving an old(ish) thread:
THANKS for this! I'm sorry I didn't say this before.
One more question: any suggestions for how I should try to get this working for Windows users as well?
THANKS for this! I'm sorry I didn't say this before.
One more question: any suggestions for how I should try to get this working for Windows users as well?
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist
-
- VIP Livecode Opensource Backer
- Posts: 9836
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Drag-drop image onto app icon?
The Windows registry is the key - here's how to use it:
http://sonsothunder.com/devres/livecode ... ile004.htm
http://sonsothunder.com/devres/livecode ... ile004.htm
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn