Shortcuts for iPad

Using “RightClick” closes an App on iPad. There is a double keystroke on iPad to bring up all Apps in the Memory. Sometimes it is necessary to remove an App from the memory prior to starting a script. Is there a shortcut for that ? “DoubleRightClick” does not work.

Essentially what you will want to do is execute two rightClick commands in a row, after shortening the Remote Work Interval. There is not a “doubleRightClick” command.

Here is an example script, which kills the running process of an application on an iPad. See comments for explanation of the steps:

params cornerclose, findclose -- this is just so that you can pass the image names in as parameters, so this script can be used as a helper script to kill any process on the iPad.

//Store default Run Options in a variable, so they can be re-set later
Put getOptions() into DefaultOptions

//Shorten the RemoteWorkInterval
SetOption RemoteWorkInterval, 0.1 

//Double click Home Button
RightClick
RightClick
WaitFor 30.0, "GreyYouTube" --image of an icon that is greyed out, so you can tell whether or not the device is in the right mode.

//Close app if running in the background
If ImageFound (cornerclose) -- image of the app to quit with the hotspot in the corner where you will need to tap to kill the process
	put FoundImageLocation() into CloseLoc -- puts the coordinates of this hotspot into a variable
	Moveto findclose -- clicks the coordinates where the symbol to quit the app should appear (you need to use coordinates since the red circle will be wiggling).
	MouseButtonDown 1 -- tap and hold down on the icon of the app to be removed. 
	Wait 3.0
	MouseButtonUp 1 -- release the tap
	Wait 3.0
	Click CloseLoc -- click the corner where the symbol is to kill the process.
	setOptions DefaultOptions -- re-set the Run Options
	RightClick -- Leave the mode that allows you to kill processes
	wait 1 
	RightClick -- Return to the home screen
Else
	setOptions DefaultOptions -- 
	RightClick -- Return to the home screen
End If