i LOVE the new bundle stuff deally. I just wish I could open it up with a shortcut key. You can already get around in the menus with the keyboard.
I wrote an applescript to pop open the regular menu (using gui scripting) but, I can't get applescript to see the bundle stuff deally. I also can't seem to make an osascript textmate command that doesn't totally freeze textMate. Anything to keep from having to grab the mouse.
It'd probly be easier (for me) for you to just add it to the app itself instead. ;)
Thanks much for the continued breakneck pace of development.
activate application "TextMate" tell application "System Events" tell process "TextMate" -- GUI Scripting statements: click menu 1 of menu bar item "Automation" of menu bar 1 click menu item "Insert Snippet" of menu 1 of menu bar item "Automation" of menu bar 1 --click menu item "x51" of menu 1 of menu item "Insert Snippet" of menu 1 of menu bar item "Automation" of menu bar 1
end tell end tell
On 28/10/2005, at 17.10, thomas Aylott wrote:
i LOVE the new bundle stuff deally. I just wish I could open it up with a shortcut key.
Yes, current candidate is control-escape, and will probably work in next build, or the one after that.
I wrote an applescript to pop open the regular menu (using gui scripting)
Is that the Automation menu specifically? otherwise control F2 moves focus to the menu bar (with some universal access option enabled, or maybe just full keyboard access).
I also can't seem to make an osascript textmate command that doesn't totally freeze textMate.
It deadlocks because when TM is executing commands, it's not managing the AS event loop. This can generally be overcome by running the osascript commands asynchronously (eventually TM will handle most events when running commands).
On Oct 28, 2005, at 11:16 AM, Allan Odgaard wrote:
On 28/10/2005, at 17.10, thomas Aylott wrote:
i LOVE the new bundle stuff deally. I just wish I could open it up with a shortcut key.
Yes, current candidate is control-escape, and will probably work in next build, or the one after that.
Excellent choice
I wrote an applescript to pop open the regular menu (using gui scripting)
Is that the Automation menu specifically? otherwise control F2 moves focus to the menu bar (with some universal access option enabled, or maybe just full keyboard access).
I had wanted one each for snippets, macros & commands I've know about ctrl-f2 for a while, but you have to hit hit navigate to the right menu, nav to the right sub menu, etc... it's just faster to hit a single key and go.
The key for the Bundle widget will be HUGE
I also can't seem to make an osascript textmate command that doesn't totally freeze textMate.
It deadlocks because when TM is executing commands, it's not managing the AS event loop. This can generally be overcome by running the osascript commands asynchronously (eventually TM will handle most events when running commands).
how do I run osascripts asynchronously?
On 28/10/2005, at 22.01, thomas Aylott wrote:
I also can't seem to make an osascript textmate command that doesn't totally freeze textMate.
It deadlocks because when TM is executing commands, it's not managing the AS event loop. This can generally be overcome by running the osascript commands asynchronously (eventually TM will handle most events when running commands).
how do I run osascripts asynchronously?
More precisely, run the osascript command asynchronously:
osascript -e 'tell app "TextMate" to insert "foo"' &>/dev/null &
The last & makes it run as a subprocess, and the &>/dev/null redirects stdout/err so that the parent process can exit w/o having to wait for the subprocess. Of course with this approach, it's not possible to get any result back or take further actions after TextMate has executed the command.