<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m trying to create a command using AppleScript to open CodeKit and select the CodeKit project associated with the current TextMate 2 project.<div class=""><br class=""></div><div class="">CodeKit’s docs want this:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">     </span>tell application "CodeKit" to select project containing path "~/clients/aProject/app.scss”</div><div class=""><br class=""></div><div class="">So I wrote this:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class="">#!/bin/bash</div></div><div class=""><div class="">[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"</div></div><div class=""><div class=""><br class=""></div></div><div class=""><div class="">osascript <<EOF </div></div><div class=""><div class="">tell application "CodeKit" to select project containing path "$TM_PROJECT_DIRECTORY"</div></div><div class=""><div class="">EOF</div></div></blockquote><div class=""><div class=""><br class=""></div><div class="">That launches CodeKit but does not select the project; CodeKit opens to the last used project, not $TM_PROJECT_DIRECTORY.</div><div class=""><br class=""></div><div class="">I’ve tried both “TM_PROJECT_DIRECTORY” and "’$TM_PROJECT_DIRECTORY’”.</div><div class=""><br class=""></div><div class="">What did I get wrong?</div><div class=""><br class=""></div><div apple-content-edited="true" class="">
Bob<br class="">-------------------<br class="">Robert J. Rockefeller<br class="">Richmond Hill, GA<br class=""><a href="http://www.bobrockefeller.com" class="">www.bobrockefeller.com</a>

</div>
<br class=""></div></body></html>