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.5   11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2    Statistic    FMM    Blog  

ImagePicker.Present

Presents the picker view.

Component Version macOS Windows Linux Server iOS SDK License
ImagePicker 7.3 ❌ No ❌ No ❌ No ❌ No ✅ Yes Paid
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 than 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

Created 17th June 2017, last changed 8th May 2020


ImagePicker.New - ImagePicker.SetAllowsEditing

Feedback: Report problem or ask question.


Start Chat