Skip to main content

Triple Click

This simple script gives you the ability to triple-click with Eggplant Functional. This can be made into a handler called TripleClick that can then be easily called whenever you are looking to execute a triple click.

This script takes one image name as an argument. Any additional arguments will be ignored.

This script relies on the RemoteWorkInterval and the MouseDoubleClickDelay global properties. If you want to modify the script, you should be familiar with these properties and how they work.

params imageToClick

// The next 3 lines change the timing between Eggplant Functional commands so that 3 quick clicks can be sent in succession.

put the RemoteWorkInterval into defaultRWI -- stores the current Remote Work Interval value so that it can be restored later
put the MouseDoubleClickDelay into clickTime -- gets the current time interval between clicks in a double-click
set the RemoteWorkInterval to clickTime -- sets the Remote Work Interval to the double-click time

// These 3 lines click the image once and then click twice more in the same location.

Click imageToClick
Click -- quickly clicks in the current mouse location
Click -- quickly clicks again in the same location to achieve a triple-click

// The last line restores the timing between Eggplant Functional commands by resetting the RemoteWorkInterval global property to its original value.

set the RemoteWorkInterval to defaultRWI