Files can be copied via right click in windows file explorer. How can I obtain a list of file(s) and resolve to a FolderItem after the user has copied them to the clipboard?
I am seeing in documents text is easy to obtain, so are pictures, but I am not seeing anything on files. RawData may work, but I need to know the data type prior to reading.
Ultimately I want users to be able to use file explorer to copy files, then paste the link to file in my app.
I’d suggest you experiment with the various object types the Xojo framework knows how to access. Perhaps the file paths are passed as text, for example.
that could be not feasible because you have to see the files and a window as drop target.
files could be dropped before the target unwanted and windows messed up.
In the Exlorer, you Right-Click one or many items,
In the Xojo window, you place a ConstructContextualMenu Event and deal there with the File(s) yu already have “copied”…
Function ConstructContextualMenu(base As DesktopMenuItem, x As Integer, y As Integer) Handles ConstructContextualMenu as Boolean
' Add some items
base.AddMenu(New DesktopMenuItem("Paste Item(s)"))
Return True
End Function
Function ContextualMenuItemSelected(selectedItem As DesktopMenuItem) Handles ContextualMenuItemSelected as Boolean
Var Clip As New Clipboard
If SelectedItem <> Nil Then
If selectedItem.Text = "Paste Item(s)" Then
Beep
End If
End If
Clip.Close
Return True
End Function
Clip contents:
rough, but you get the idea. (done with a mac).
I selected:
This is true, not only that, they can select multiple files while holding the shift or control key while selecting and then right clip to copy all. That’s why I want mechanism to use existing methods the users are used too.
i have a other idea which is maybe possible.
register a send to app for the explorer context menu.
similar compress to zip menu in windows explorer.
at least it not need a shift key hold for the extra context menu.
or this open with app menu.