Here are my modifications to OpenTerminalHere.
Firstly, update to always open in new tab, and use the leopard icon:
http://jameslow.com/content/software/misc/OpenTerminalHere.zip
Secondly, completely new app to launch terminal and run ant from Finder:
http://jameslow.com/content/software/misc/AntHere.zip
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.)