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
Sets trigger for document trigger.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
FileDialog | 9.1 | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example |
---|---|---|
FileName | The file name of the script. | Get(FileName) |
ScriptName | The script to trigger. | "FilesSelected" |
Returns OK or error.
Import file with DocumentPicker:
# set script to call later
Set Variable [ $r ; Value: MBS( "DocumentPicker.SetTrigger"; Get(FileName); "Trigger" ) ]
# allowed list of file types:
Set Variable [ $Types ; Value: "public.jpeg¶public.png" ]
# show import dialog:
Set Variable [ $r ; Value: MBS( "DocumentPicker.Import"; $Types; 0 ) ]
Sample trigger script:
Set Field [ PlaceHolder::Paths ; MBS( "DocumentPicker.Files" ) ]
Set Variable [ $path ; Value: GetValue(PlaceHolder::Paths; 1) ]
If [ Length ( $path ) > 0 ]
Set Field [ PlaceHolder::Container ; MBS( "Container.ReadFile"; $path; "auto") ]
Else
Set Field [ PlaceHolder::Container ; "" ]
End If
Created 28th January 2019, last changed 8th July 2020
DocumentPicker.Open - DragDrop.AttachToWindow
Feedback: Report problem or ask question.