Skip to content

Instantly share code, notes, and snippets.

@mhkeller
Created July 12, 2013 16:45
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 mhkeller/5985893 to your computer and use it in GitHub Desktop.
Save mhkeller/5985893 to your computer and use it in GitHub Desktop.
--tell application "iOS Simulator" to activate
tell application "System Events"
set visible_apps to application processes whose visible is true
repeat with app_ in visible_apps
if name of app_ is "iOS Simulator" then
set visible of app_ to true
end if
end repeat
end tell
global counter_prop
set counter_prop to 0
on idle
set counter_prop to counter_prop + 1
if counter_prop > 15 then
else
tell application "AppleScript Editor"
ES move mouse {54, 192} -- double click word
ES click mouse
ES click mouse
ES move mouse {260, 240} -- click right arrow
delay 0.3 -- .3 tested as fastest
ES click mouse
ES move mouse {116, 242} -- click suggestion button
delay 0.38 -- .375 tested as fastest
ES click mouse
ES move mouse {68, 237} --select first suggestion
delay 0.48 -- .475 tested as fastest
ES click mouse
ES move mouse {178, 346} --submit
delay 0.31 -- .305 tested as fastest
ES click mouse
end tell
return 0.02 -- tested as fastest
end if
end idle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment