<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><DIV>On Oct 22, 2006, at 1:11 PM, Andy Herbert wrote:</DIV><BLOCKQUOTE type="cite"><DIV><DIV>On 22 Oct 2006, at 14:15, thomas Aylott wrote:</DIV><BLOCKQUOTE type="cite"><DIV><DIV>On Oct 22, 2006, at 8:18 AM, Andy Herbert wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I've been trying to come up with a solution to creating shell scripts within Textmate and creating a widget on the Dashboard layer to call the script with references to any files or URLs passed to it, and I have eventually come up with a Textmate widget & bundle to do all this.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The widget bundle can be found at:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://homepage.mac.com/andy.herbert/Widget.tmbundle.zip">http://homepage.mac.com/andy.herbert/Widget.tmbundle.zip</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I hope it might be useful to someone else on this list.</DIV></BLOCKQUOTE></DIV><BR><DIV>I want to use existing scripts that already have names and stuff without being deleted when closing the widget.</DIV><DIV>Can you make it link to existing scripts easily?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><B>Link open document into new widget</B></DIV><DIV>and then change the existing one to:</DIV><DIV><B>Copy open document into new widget</B></DIV></BLOCKQUOTE></DIV><BR><DIV>Thanks for that suggestion, I did wonder whether to have an option to call scripts directly which weren't saved for the purpose of the widget, but I figured that would cause all sort of problems handling error reporting, something which I didn't want to deal with in the limited UI of a dashboard widget.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Despite this I've included a new option in the bundle to "Call Document in New Widget" which basically creates a new script used by the widget which calls whatever $TM_FILENAME is and also passes any arguments to it, this way if you move, delete, or rename the script it calls it's reported in the log generated by the widget. The label given to the widget is also the original filename of the script it links to, so it might help save you some time. Since I've made some changes to the widget to do this, I'd recommend manually deleting the widget in ~/Library/Widgets/ (or use the widget manager), and select the new "Install Widget" option in the bundle to update it.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks for the positive feedback.</DIV></BLOCKQUOTE></DIV><BR><DIV>Perfect!</DIV><DIV>And nice turnaround time.</DIV><DIV><BR><DIV>thomas Aylott — <B>subtleGradient </B>— CrazyEgg</DIV><DIV><BR class="khtml-block-placeholder"></DIV></DIV></BODY></HTML>