Last active
December 14, 2015 12:20
-
-
Save tomslominski/7af635eeef71cf60bba8 to your computer and use it in GitHub Desktop.
Automator script to open the MAMP PHP error log in nearest terminal window - save as Automator application, export to your Applications folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run {input, parameters} | |
tell application "Terminal" | |
activate | |
if (count windows) is 0 then | |
do script with command "tail -f /Applications/MAMP/logs/php_error.log" | |
else | |
repeat with win in windows | |
try | |
if get frontmost of win is true then | |
tell application "System Events" to keystroke "t" using {command down} | |
delay 0.5 | |
do script with command "tail -f /Applications/MAMP/logs/php_error.log" in (selected tab of win) | |
end if | |
end try | |
end repeat | |
end if | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment