applescript - How does one keep Alfred 2 from opening and entering your Terminal command in a new window when Terminal is already open? -


what changes make make opens window if terminal isn't running otherwise, enters command in open window? i'm thinking control flow, conditional jawn. i'm not sure how write out though.

thanks, tj

the script follows:

on alfred_script(q)     tell application "terminal"         activate         script q     end tell end alfred_script 

try:

on alfred_script(q) tell application "terminal"     if not (exists window 1) reopen     activate     script q in window 1 end tell end alfred_script 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -