Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tell application "Mail"
- activate
- set snapshotdialog to display dialog "Neue Revision von xU4. Snapshot erstellen?" buttons {"Cancel", "OK"} giving up after 180 with icon caution with title "xU4 Snapshot"
- if button returned of snapshotdialog = "OK" then
- activate application "Terminal"
- tell application "System Events" to tell process "Terminal"
- keystroke "t" using {command down}
- end tell
- tell application "Terminal"
- repeat with win in windows
- try
- if get frontmost of win is true then
- do script "cd ~/code/sh; . xu4snapshot.sh" in (selected tab of win)
- end if
- end try
- end repeat
- end tell
- else if gave up of snapshotdialog is true then
- activate application "Terminal"
- tell application "System Events" to tell process "Terminal"
- keystroke "t" using {command down}
- end tell
- tell application "Terminal"
- repeat with win in windows
- try
- if get frontmost of win is true then
- do script "cd ~/code/sh; . xu4snapshot.sh" in (selected tab of win)
- end if
- end try
- end repeat
- end tell
- end if
- end tell
Add Comment
Please, Sign In to add comment