Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

ImagePicker.Present

Presents the picker view.

Component Version macOS Windows Linux Server iOS SDK
ImagePicker 7.3 ❌ No ❌ No ❌ No ❌ No ✅ Yes
MBS( "ImagePicker.Present" )

Parameters

none

Result

Returns OK or error.

Description

Presents the picker view.
This will show the user interface and start the process.
Your script may call this in a script and then wait for the script trigger.

You may decide whether you close it by calling ImagePicker.Dismiss yourself or you leave it open to take more than one picture.

Examples

Show picker, wait three seconds, take a picture and close automatically:

Set Variable [ $r ; Value: MBS( "ImagePicker.Present") ]
#
Pause/Resume Script [ Duration (seconds): 1 ]
#
Pause/Resume Script [ Duration (seconds): 1 ]
#
Pause/Resume Script [ Duration (seconds): 1 ]
Set Variable [ $r ; Value: MBS( "ImagePicker.TakePicture" ) ]
#
Pause/Resume Script [ Duration (seconds): .25 ]
Set Variable [ $r ; Value: MBS( "ImagePicker.Dismiss" ) ]

Show picker and wait for script trigger:

Set Variable [ $r ; Value: MBS( "ImagePicker.SetScript"; Get(FileName); "GotImage") ]
Set Variable [ $r ; Value: MBS( "ImagePicker.Present") ]

Set various options and show picker:

Set Variable [ $r ; Value: MBS( "ImagePicker.New" ) ]
Set Variable [ $r ; Value: MBS( "ImagePicker.SetScript"; Get(FileName); "MBS GotImage") ]
Set Variable [ $r ; Value: MBS( "ImagePicker.SetSourceType"; "Camera") ]
Set Variable [ $r ; Value: MBS( "ImagePicker.SetAllowsEditing"; 0 ) ]
Set Variable [ $r ; Value: MBS( "ImagePicker.SetCameraCaptureMode"; "Photo" ) ]
Set Variable [ $r ; Value: MBS( "ImagePicker.SetCameraDevice"; "Front" ) ]
Set Variable [ $r ; Value: MBS( "ImagePicker.SetCameraFlashMode"; "Off" ) ]
Set Variable [ $r ; Value: MBS( "ImagePicker.SetShowsCameraControls"; 0 ) ]
Set Variable [ $r ; Value: MBS( "ImagePicker.Present") ]

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 17th June 2017, last changed 28th September 2022


ImagePicker.New - ImagePicker.SetAllowsEditing