[TxMt] Re: Calling CodeKit With AppleScript

Robert J. Rockefeller bob at bobrockefeller.com
Wed Apr 29 14:59:11 UTC 2015


OK, CodeKit does display the expected string in its test dialog box. So it may be a problem on the CodeKit end. I have an email into the developer on that.

Bob
-------------------
Robert J. Rockefeller
Richmond Hill, GA
www.bobrockefeller.com

> On Apr 29, 2015, at 10:46 AM, Allan Odgaard <mailinglist at textmate.org> wrote:
> 
> On 29 Apr 2015, at 1:31, Robert J. Rockefeller wrote:
> 
>> So I wrote this:
>> 
>> #!/bin/bash
>> osascript <<EOF
>> tell application "CodeKit" to select project containing path "$TM_PROJECT_DIRECTORY"
>> EOF
>> 
>> That launches CodeKit but does not select the project; CodeKit opens to the last used project, not $TM_PROJECT_DIRECTORY.
> 
> This is probably more of a CodeKit issue.
> 
> Normally you would use: `POSIX file "$TM_PROJECT_DIRECTORY"`.
> 
> But given the command is `containing path` then perhaps it does expect a string? Though in the bit you quoted from the documentation it uses a tilde in the path, which is a bit weird, if it’s a subset search.
> 
> For testing you could do this:
> 
> 	#!/bin/sh
> 	osascript <<EOF
> 	tell application "CodeKit" to display alert "Test" message "$TM_PROJECT_DIRECTORY"
> 	EOF
> 
> This should show if the expected string is actually obtained.
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate



More information about the textmate mailing list