Displays a flash dialog box for a specified period of time.
Dial_FlashDialog ( switches ; ticks ; message ; countdownText )
|switches||(optional) this changes the behaviour of the dialog|
|ticks||the time this dialog must be visible, in 1/60th of a second|
|message||specifies the text you want to display|
|countdownText||(optional) a text at the bottom of the dialog that will countdown the seconds remaining|
Switches can be empty or one of these:
|-NoteIcon||shows a note icon (indicating this dialog gives the user information)|
|-CautionIcon||shows a caution icon (indicating this dialog warns the user)|
|-StopIcon||shows a stop icon (indicating this is something severe which the user needs to address )|
|-CustomIcon||shows a custom icon. This icon needs to be set before with the Dial_IconControl function|
You can also add this switch:
|-IconSize=48||display the icon at 48×48 pixels|
Data type returned
This function always returns 0.
Troi Dialog Plug-in 1.2
FileMaker Pro 14 to 18
You can hold flash dialogs on the screen longer, or get rid of them early. This is what is possible:
– To dismiss a flash dialog: click on the dialog or press the ENTER or SPACE key.
– To keep a flash dialog longer on the screen: click on the dialog and hold the mouse button down. Or keep the ENTER or SPACE key down. When you release the mouse button or key the dialog goes away.
The parameter countdownText was added in v8.0: when you specify a countdown text the string “<secs>” will be replaced with the actual time in seconds remaining. So use for example the text: “This dialog will dismiss in <secs> seconds.”
IMPORTANT: Use only in a script. Do not use this function in a calculated field definition, because when FileMaker calculates the fields, this will result into a repeated dialog for EACH record.
Set Variable [ $Result ; Dial_FlashDialog ( "-Unused" ; 120 ; "Have a nice day" ) ]
This will show a flash dialog box for 120 ticks = 2 seconds.
We assume that in your FileMaker file the following fields are defined:
gDialogText Global, text gTicksPrefs Global, text result Global, text
The gDialogText field contains the text you want to display, and can be filled for example with a calculation. gTicksPrefs should be filled with a time in 1/60th of a second. You can then use this as a preference. Add the following script step:
Set Field [ result ; Dial_FlashDialog ( "-NoteIcon" ; gTicksPrefs ; gDialogText ) ]
This shows a flash dialog with the text and a note icon.
Set Variable [ $Message ; "Hello there!" ] Set Variable [ $CountdownText ; "This flash dialog will dismiss in <secs> seconds." ] Set Variable [ $Result ; Dial_FlashDialog ( "-Unused" ; 5 * 60 ; $Message ; $CountdownText ) ]
This will show a flash dialog box for 5 seconds, with the text counting down to zero.
Related script step
|Show Flash Dialog|