Skip to content

Instantly share code, notes, and snippets.

@Jonahss
Created April 23, 2015 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jonahss/7cff13d1ab7ce6775960 to your computer and use it in GitHub Desktop.
Save Jonahss/7cff13d1ab7ce6775960 to your computer and use it in GitHub Desktop.
var targetWindow = UIATarget.localTarget().frontMostApp().mainWindow();
var targetApp = UIATarget.localTarget();
var interval = 1000; //ms interval to repeat
var wait = 5; //seconds to wait
var tapLocation = {x: 300, y: 300};
var future = new Date();
future.setSeconds(future.getSeconds()+wait);
var now = function() {
return new Date();
}
var repetitions = 0;
function repeatOperation() {
UIALogger.logPass('repeatOperation'+repetitions.toString());
var targetApp = UIATarget.localTarget();
// targetApp.tap(tapLocation);
repetitions++;
}
while(now() < future) {
repeatOperation();
UIATarget.localTarget().delay(1);
}
throw new Error("oh boyyyyyyyyyy");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment