Skip to content

Instantly share code, notes, and snippets.

@sencai
Created August 11, 2016 21:17
Show Gist options
  • Save sencai/51d3b1e23240f08bae96a3d66c5d1dde to your computer and use it in GitHub Desktop.
Save sencai/51d3b1e23240f08bae96a3d66c5d1dde to your computer and use it in GitHub Desktop.
Run Telegram on Startup of Mac
run application "Telegram"
tell application "System Events"
repeat until window 1 of process "Telegram" exists
delay 1
end repeat
repeat until not (exists (window 1 of process "Telegram"))
click button 1 of windows of application process "Telegram"
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment