There are many times where I’d like to open a new terminal, in my current space. Using Alt-Tab to find terminal, will send me to another space, if it’s open.
But, using the dock, works fine. So, I’ve been trying to use the dock to spawn a new terminal, but I can’t figure out what I’m doing wrong. Here’s how I’m trying it. Feel free to correct me, or even point me in a new direction (other than clicking that flag in spaces that says NOT to take you to the space – I like the feature when alt-tabbing to mail.app)
tell application "System Events" if not (exists process "Terminal") then tell application "Terminal" activate end tell else tell application "System Events" to tell process "Dock" tell UI element "Terminal" of list 1 perform action "AXShowMenu" tell menu 1 tell menu item "New Window" tell menu "New Window" click menu item "Pro" end tell end tell end tell end tell end tell end if end tell