Advertisement
smhdale

NewTerminalWindow.scpt

Aug 7th, 2018
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Check if iTerm is running already
  2. set isRunning to false
  3. tell application "System Events"
  4.     if (get name of every application process) contains "iTerm2" then
  5.         set isRunning to true
  6.     end if
  7. end tell
  8.  
  9. -- Create new Terminal window
  10. tell application "iTerm"
  11.     if isRunning then
  12.         create window with default profile
  13.     else
  14.         activate
  15.     end if
  16. end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement