Learn how to Capture Gestures in FileMaker Go
THERE WERE SO MANY NEW FEATURES added in FileMaker V13, it’s sometimes hard to keep track. The latest example of this is the OnGestureTap script trigger and a companion function, Get(TriggerGestureInfo), which allow you to capture gestures in FileMaker Go. James Scarpetta of the Scarpetta Group just posted an article showing how to capture how, when and where a user touches the screen, and to trigger a script based on the result:
OnGestureTap is a new script trigger introduced in FileMaker Pro 13 which lets you trigger an event with tap controls. It can be triggered with either a Single-tap with one, two or three fingers or a Double-tap with one finger.
To get the most from this you want to use the new function Get ( TriggerGestureInfo ) to get the details of the gesture that activated the trigger. It will return a list of the tap, the tap count, how many fingers were used to make the tap, and the x and y coordinates where the tap occurred.
Here is an example of the list returned:
tap 1 – Type of gesture. 1 2 – Tap count. 2 3 – Number of fingers used. 300 4 – x Coordinate 400 5 – y Coordinate
The numbers before the description indicate the line in which they are on and you need to know to use the GetValue ( text ) and return what it received on the tap. Below you see how the script and calculation are written to show the arrows in the slide control.
Use script logic to trap for any combination of the variables, and you can program any outcome you desire. There are some things to be aware of, though:
OnGestureTap won’t activate if the taps are in an active web viewer or in active edit boxes
OnGestureTap is activated with a single tap of one, two, or three fingers, or a double tap with one finger.
Read the entire blog post and check out the example file at the link.