Skip to content

Instantly share code, notes, and snippets.

@sencai
sencai / RunTelegramOnStartup.scpt
Created August 11, 2016 21:17
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
@sencai
sencai / hide.sh
Created May 16, 2016 04:23
Hide Telegram in Mac Dock
#!/bin/bash
/usr/libexec/PlistBuddy -c "add :LSUIElement bool true" /Applications/Telegram.app/Contents/Info.plist