Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Queries file descriptor.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DragDrop | 8.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameter | Description | Example |
---|---|---|
droparea | The reference ID for this drop area. Use functions like DragDrop.CreateWithControl to create a drop area. | $dropHandle |
Index | The index of the file descriptor from 0 to DragDrop.GetFileDescriptorCount-1. | 0 |
Selector | Which value to return. Can be Name, Size, Data or Path. |
"Name" |
Returns value or error.
Check for a file descriptor coming with Drag & Drop:
Set Variable [ $count ; Value: MBS("DragDrop.GetFileDescriptorCount"; $dropview; "") ]
If [ $count > 0 ]
Set Variable [ $index ; Value: 0 ]
Loop
Pause/Resume Script [ Duration (seconds): ,1 ]
Set Variable [ $name ; Value: MBS("DragDrop.GetFileDescriptor"; $dropview; $index; "name") ]
Set Variable [ $data ; Value: MBS("DragDrop.GetFileDescriptor"; $dropview; $index; "data") ]
Set Variable [ $size ; Value: MBS("DragDrop.GetFileDescriptor"; $dropview; $index; "size") ]
Set Variable [ $path ; Value: MBS("DragDrop.GetFileDescriptor"; $dropview; $index; "path") ]
If [ Length ( $path ) > 0 ]
New Record/Request
Set Field [ DragTest::field ; MBS("Files.ReadFile"; $path; "auto") ]
Set Field [ DragTest::Description ; "Got via file descriptor with path" ]
Set Field [ DragTest::Text ; $path ]
Commit Records/Requests [ With dialog: Off ]
Else If [ $size > 0 ]
New Record/Request
Set Field [ DragTest::field ; $data ]
Set Field [ DragTest::Text ; $name ]
Set Field [ DragTest::Description ; "Got via file descriptor with data" ]
Commit Records/Requests [ With dialog: Off ]
End If
# next
Set Variable [ $index ; Value: $index+1 ]
Exit Loop If [ $index = $count ]
End Loop
End If
Created 5th February 2018, last changed 11st November 2020
DragDrop.GetEmailSubject - DragDrop.GetFileDescriptorCount
Feedback: Report problem or ask question.