[TxMt] Matlab bundle

Mikael Hultgren blomma at fastmail.fm
Tue Dec 18 04:57:20 UTC 2007


On 17 dec 2007, at 21.09, Thomas Aylott - subtleGradient wrote:

> On Dec 17, 2007, at 2:27 PM, Miguel Vaz wrote:
>
>> Btw, a colleague of mine did his "link" with something called  
>> HotKeys (I think) in windows.
>> He defined a macro for pasting the selected text in his editor  
>> directly in the matlab window.
>> No idea, though, how to make this in os x.
>
> Sounds like a job for…
>        Applescript UI Scripting.
>
> I have a handy command that takes the current selection and pastes  
> it into the terminal.
>        (not directly attached since it is so incredibly dangerous)
>
> Input: Selection or Document
> Output: Tooltip
>
>
>        pbcopy
>        osascript -e 'tell application "Terminal" to activate' \
>                -e 'tell application "System Events"' \
>                        -e 'tell application process "terminal"' \
>                                -e 'delay 0.1' -e 'keystroke "k"  
> using command down' \
>                                -e 'keystroke "v" using command down' \
>                        -e 'end tell' \
>                -e 'end tell' \
>                -e 'tell application "TextMate" to activate'
>        echo "Selection Sent to Terminal"
>
>
> That might be convertible for whatever. I made one similar for doing  
> Second Life code.
> 	(I have a whole Second life bundle, if anyone is interested.)
>

I would love to see that bundle, i have a project in school comming up  
soon that involves coding a game in second life.


More information about the textmate mailing list