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: 11.4   11.5   12.0   12.1   12.2   12.3   12.4   12.5   13.0   13.1    Statistic    FMM    Blog  

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 paid license.

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


ImagePicker.New - ImagePicker.SetAllowsEditing

💬 Ask a question or report a problem


Start Chat