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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Check for source availability.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
ImagePicker | 7.3 | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example |
---|---|---|
sourceType | The source to use to pick an image. Can be PhotoLibrary, Camera or SavedPhotosAlbum. |
"Camera" |
Returns OK or error.
Check for source type being available:
Set Variable [ $SourceType ; Value: Get(ScriptParameter) ]
Set Variable [ $r ; Value: MBS( "ImagePicker.IsSourceTypeAvailable"; $sourceType ) ]
If [ $r ≠ 1 ]
Show Custom Dialog [ "Can't pick picture." ; "The source " & $sourceType & " is not available." ]
Exit Script [ Text Result: "failed" ]
End If
Check availability:
Set Variable [ $CameraAvailable ; Value: MBS("ImagePicker.IsSourceTypeAvailable"; "Camera") ]
Set Variable [ $PhotoLibraryAvailable ; Value: MBS("ImagePicker.IsSourceTypeAvailable"; "PhotoLibrary") ]
Set Variable [ $SavedPhotosAlbumAvailable ; Value: MBS("ImagePicker.IsSourceTypeAvailable"; "SavedPhotosAlbum") ]
This function is free to use.
Created 17th June 2017, last changed 2nd May 2023