Reader Comments

  1. I made a slight modification to your script. I found that if Terminal is not yet started when Open Terminal Here is clicked, then the following would happen:

    1. Terminal process starts
    2. A single tab is opened at the default starting path
    3. A second tab is created and the path is set to the target as expected

    The problem is that I don’t need that initial tab to be created. In this situation, I just want Terminal to launch with one tab at the desired path.

    Here’s a link to the bit of code I changed: http://snipt.net/napple/oth

    I just begin the activate_terminal function by counting the number of processes named Terminal. If there are zero, then cmd-t will not be triggered.

    (I believe this is necessary because calling ‘tell application “Terminal”‘ actually launches Terminal and creates a single window. As a result the second branch of the outer if is executed, which uses the cmd-T code.)

Write a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.