Hello,
I'm working on a "matlab console" bundle, à la "R console bundle". The goal is to emulate a matlab console in a textmate window, which is much more practical than the terminal to edit long commands. This is so far working quite well, running matlab in the background and sending/receiving messages via text files. However, when I have a matlab script opened in a textmate window, I want to be able to execute it in the textmate window where the matlab console lies. I thought of doing that with applescript, but the dictionary of textmate seems pretty poor, there is no way of handling tabs for example.
So what I want to be able to do is a run a command from a window that write its results in a different textmate window or tab (which has a specific name, something like "Console.Mcon"). Is this possible ? and how ?
Thanks
Pierre
On 02.04.2009, at 15:46, Pierre Morel wrote:
So what I want to be able to do is a run a command from a window that write its results in a different textmate window or tab (which has a specific name, something like "Console.Mcon"). Is this possible ? and how ?
Hmm, I guess it's not possible. You can run a command from win 1 and append Matlab's output to let's say the Console.Mcon file, but then TM doesn't load the new content in its Console.Mcon window automatically. You can try to run an applescript (via "System Events") to activate Finder and then back TextMate to let TM re-scan the docs, but this works only partly, I mean; you would get a TM alert window with "should I keep TM's version or not?"
I have a similar problem with Rdaemon. If the user has two windows one for the script and one for the daemon, how to execute the script code visible in the daemon's window.
Up to now I only can send the script code to the daemon invisible and then switch to the daemon's window to use my sent code. This is useful if one develops functions etc.
On the other hand why don't you use my R daemon approach meaning paste Matlab's output as snippet into the current doc?
--Hans