Skip to main content

Dial_PresentImage (function reference)

By November 1, 2020June 23rd, 2021Online Help, Troi Dialog Plug-in
Troi Dialog Plug-in for FileMaker Pro

Dial_PresentImage

Displays one or more images or movies full screen or as a slideshow.

SyntaxFunction badge

Dial_PresentImage ( switches ; showTicks ; fileList )

Parameters

switches determine the behavior of the function
showticks the amount of time each image will be shown, in ticks (= 1/60th of a sec). Movies will be played to the end
fileList one or more paths to image or movie files, separated by a return, can also be a container

Switches

switches can be one of this:

-KeepMovieControllerVisible the movie controller will be shown and not be hidden
-PresentOn2ndScreen use the secondary display (the main being the one with the menu bar)

The fileList can be a container field with an image or movie in it. It can also be a list of one or more file specifications separated by returns.
On macOS you can use one of the following syntax:
a full path: HardDiskName:folder:folder:imagename.jpg
a FileMaker image path: imagemac:/HardDiskName/folder/folder/imagename.jpg
a FileMaker movie path: moviemac:/HardDiskName/folder/folder/moviename.mov

On Windows you can use:
a full path: C:\folder\folder\imagename.jpg
a FileMaker image path: imagewin:/C:/folder/folder/imagename.jpg
a FileMaker movie path: moviewin:/C:/folder/folder/moviename.mov

Returned Result

Data type returned

Error code

Result

If successful it returns 0 after the display of the images

If unsuccessful it returns an error code starting with $$ and the error code. Returned error codes can be:

$$-50 parameter error
$$-41 not enough memory
$$-4250 QuickTime version too old

Originated in

Troi Dialog Plug-in 5.0

Compatibility

FileMaker Pro 16 to 19

Considerations

– This function is only available on macOS in FileMaker Pro 14 and later.
– The maximum time an image can be shown is capped to 1 minute
– All formats supported by QuickTime can be shown, like the still image formats PICT, JPEG, GIF, TIFF, PNG, Photoshop, PDF, BMP and movie formats like QuickTime MOV, MPG and AVI.
– Animated GIFs are played like movies.
– You can also use a container field as the fileList parameter. The container field can be an image stored in the file or stored as a reference (movies are always stored as reference).
– By default the movie controller will be hidden when showing a movie. When moving the mouse the controller will be visible for a few seconds.
– Use the ESC key to stop the display of one image or movie. Use SHIFT ESC to stop all movies.
– If the image can not be displayed an error text is displayed full screen, the slideshow will continue.
– In the script add an Allow toolbars[off] step, as toolbars will remain visible otherwise.

Example

Dial_PresentImage ( "-Unused" ; 60 ; "C:\sample images\myphoto.jpg" )

will show the JPEG image full screen for 60 ticks = 1 second.

Example 2

This example will use fields to show a slideshow of images and movies. We assume that in your FileMaker file the following fields are defined:

Filelist     	Text field
gErrorCode    	Global, text

In the field FileList there should be a list of items to display in sequence, for example:
imagemac:/myDisk/Users/yann/coeurdevoh.jpg
myDisk:testfolder:Supertest.mov
myDisk:testfolder:images:troilogo.gif
moviemac:/myDisk/Users/spielberg/indiana.mov

Add the following script step:

Set Field [ gErrorCode ; Dial_PresentImage ( "-Unused" ; 60 ; Filelist ) ]

This will show the slideshow of the chosen images.

Used in example file

PresentImage.fmp12

Related script stepScript step badge

Show Slideshow

Related topics

Troi Dialog Plug-in online help (overview)


Online Help Page for Troi Dialog Plug-in for 16 to 19 –> Dial_PresentImage (dialp4319) 2021-0623 15:52:35