<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>Thanks everybody. </DIV><DIV>It looks like for the time being I'll just make a bundle command to start the timer, and have to launch it myself. If you develop something for this, Cliff, do let me know!</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Best,</DIV><DIV>Zvi</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica">On May 23, 2007, at 1:57 PM, Brooks Seymore wrote:</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Helvetica; min-height: 19.0px"><BR></P> <BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica">Could this also be done through a Bundle Command, with the new document created and the timer launched by running the command?</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px; font: 16.0px Helvetica; min-height: 19.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 10.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica">B.</FONT></P> </BLOCKQUOTE><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Helvetica; min-height: 19.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica">Yeah, you can trigger a Applescript when you run a bundle command or even include run it from the script used when creating a file from a template so creating a new file would start the timer, but then you wouldn't be able to log time if you were just editing existing files.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Helvetica; min-height: 19.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica">I haven't had time to look into it for myself, but does anyone else know if you can just use launchd to watch a TextMate related file for changes, say, the TextMates preferences for example?<SPAN class="Apple-converted-space">  </SPAN>If the file is modified you can assume you're working with TM & then start your timer? <SPAN class="Apple-converted-space">  </SPAN>I know launchd can monitor paths, but I don't know if TM alters its prefs file on disk when its running or just when it shuts down or what.<SPAN class="Apple-converted-space">  </SPAN>If so it'd maybe work to use launchd to watch the prefs file and run a script.<SPAN class="Apple-converted-space">  </SPAN>The script could even maybe use</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Helvetica; min-height: 19.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica"><SPAN class="Apple-tab-span" style="white-space:pre">  </SPAN>defaults read com.macromates.textmate NSRecentDocumentRecords</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Helvetica; min-height: 19.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica">to examine what documents were last opened / saved and mess with your timer accordingly, though you'd have to translate them from alias references (or whatever the heck the prefs file stores) to paths somehow.<SPAN class="Apple-converted-space">  </SPAN>Thats beyond me at the moment.</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Helvetica; min-height: 19.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica">I'm just tossing out ideas...</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Helvetica; min-height: 19.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica">- Cliff</FONT></P> </BLOCKQUOTE></DIV><BR></BODY></HTML>