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: 9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3    Statistic  

ImagePicker.Present

Presents the picker view.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
ImagePicker 7.3 No No No No Yes
MBS( "ImagePicker.Present" )   More

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

Example Databases

Blog Entries

Release notes

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


ImagePicker.New   -   ImagePicker.SetAllowsEditing

Feedback: Report problem or ask question.




Links
MBS FileMaker blog