Hi!
I develop my Rails pages with two monitors.
On the left Monitor, I have TextMate open, on the right monitor, I have Safari with the current controller/action I'm editing open.
Instead of always manually: 1) Saving document in TextMate 2) Focusing Safari 3) Refreshing Safari 4) Put focus back on TextMate
I wrote the following Script in the Bundle Editor:
osascript -e " tell application "System Events" key down command keystroke "s" key up command end tell
tell application "Safari" activate end tell tell application "System Events" key down command keystroke "r" key up command end tell
tell application "TextMate" activate end tell "
However, the last three lines make TextMate freeze, and Safari doesn't even Refresh. As soon as I remove those three lines, everything works (except of course, refocusing TextMate).
Any ideas?
Is there any support for TextMate? I bought TextMate a couple of months ago.
Thanks a bunch!
R. Christian
On 5/1/2006, at 15:58, Robert C. Mannl wrote:
[...] I wrote the following Script in the Bundle Editor:
Actually, there's already a Refresh Running Browser command from which you can remove the “activate” part. I think that is what you seek.
As to why your command hangs, TextMate will wait for it to complete, but since the command requires that TM reply to an AppleScript event, that will never happen. To solve this one can add “&>/dev/null &” to the command line to run it in a detached sub-proces.
Thanks a bunch!
Great app
On Jan 5, 2006, at 4:29 PM, Allan Odgaard wrote:
[...] I wrote the following Script in the Bundle Editor:
Actually, there's already a Refresh Running Browser command from which you can remove the “activate” part. I think that is what you seek.
As to why your command hangs, TextMate will wait for it to complete, but since the command requires that TM reply to an AppleScript event, that will never happen. To solve this one can add “&>/dev/null &” to the command line to run it in a detached sub- proces.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 05-Jan-2006, at 08:29 , Allan Odgaard wrote:
On 5/1/2006, at 15:58, Robert C. Mannl wrote:
[...] I wrote the following Script in the Bundle Editor:
Actually, there's already a Refresh Running Browser command from which you can remove the “activate” part. I think that is what you seek.
Hi Allan,
A TextMate noob here. I'm just about to purchase it, partly because of the extensibility, and because it just "feels right". One question, though. You mention a "Refresh Running Browser" command above. How does one activate it? A more general question - _where_ is there a list of these commands? For instance, when I edit a macro (i.e. "Delete Line") it contains "selectHardLine" and "deleteBackward". Is there a documented list of these commands? I've tried Help and looking in the online manual, but I must be using the wrong search terms. Thanks in advance for any pointers you can provide
Carpe viam, Mike
Michael Larocque Chief Cook and Bottle Washer Prolumina Communications Inc. http://prolumina.com/~mlarocque/
On 5/1/2006, at 17:10, Michael Larocque wrote:
[...] You mention a "Refresh Running Browser" command above. How does one activate it?
Command-R (when a HTML document is open) or click the gear menu in the status bar, it's under the HTML bundle, or Automation -> Run Command -> HTML (the gear is shorthand for the automation menu).
A more general question - _where_ is there a list of these commands? For instance, when I edit a macro (i.e. "Delete Line") it contains "selectHardLine" and "deleteBackward". Is there a documented list of these commands?
Ah, those are not the same commands. When I say commands I refer to commands in the bundles, which are generally shell scripts, i.e. these: http://macromates.com/textmate/manual/commands
I've tried Help and looking in the online manual, but I must be using the wrong search terms [...]
I'll look into improving the macro chapter. Macros are read/record- only and cannot be edited.
On 05-Jan-2006, at 10:10 , Allan Odgaard wrote:
On 5/1/2006, at 17:10, Michael Larocque wrote:
[...] You mention a "Refresh Running Browser" command above. How does one activate it?
Command-R (when a HTML document is open) or click the gear menu in the status bar, it's under the HTML bundle, or Automation -> Run Command -> HTML (the gear is shorthand for the automation menu).
Ah, found it. After my initial shock of what the command was doing (bringing my three open browsers to the front and refreshing their windows - ack!) I dug further to see what the RRB code did, and will modify it to suit my preferred way of working. :)
A more general question - _where_ is there a list of these commands? For instance, when I edit a macro (i.e. "Delete Line") it contains "selectHardLine" and "deleteBackward". Is there a documented list of these commands?
Ah, those are not the same commands. When I say commands I refer to commands in the bundles, which are generally shell scripts, i.e. these: http://macromates.com/textmate/manual/commands
Understood. But the question still stands: Is there a documented list of these "internal functions", or whatever you call them? For me at least, seeing something like that would give me a better understanding of what the full capabilities of Textmate are, and what the possibilities are.
I've tried Help and looking in the online manual, but I must be using the wrong search terms [...]
I'll look into improving the macro chapter. Macros are read/record- only and cannot be edited.
Is there any chance that this might be changed in the future?
Still a noob, but learning TM quickly, and liking it more and more. The cheque will be in the mail within a couple of hours. :)
Carpe viam, Mike
Michael Larocque Chief Cook and Bottle Washer Prolumina Communications Inc. http://prolumina.com/~mlarocque/
Il giorno 05/gen/06, alle ore 20:49, Michael Larocque ha scritto:
I'll look into improving the macro chapter. Macros are read/record- only and cannot be edited.
Is there any chance that this might be changed in the future?
I guess it's deeply entangled with having pervasive OSAScript support, since then macros would just become recorded scripts. It won't be in 1.2 (mainly project stuff) and I'd be surprised if it makes its way into 1.3… but I guess it's on the List.
On 6/1/2006, at 0:21, Domenico Carbotta wrote:
I'll look into improving the macro chapter. Macros are read/ record-only and cannot be edited.
Is there any chance that this might be changed in the future?
I guess it's deeply entangled with having pervasive OSAScript support, since then macros would just become recorded scripts. It won't be in 1.2 (mainly project stuff) and I'd be surprised if it makes its way into 1.3… but I guess it's on the List.
I couldn't have said it better myself :)
When I use the Command+R, with Safari and FF open, it nicely refreshes safari, but in FF I just get a new blank tab. It might be mentioned that the open .php file isn't the same as the current working URL (which is a good thing in my opinion and it works just as I want with Safari)
Andreas
On 7/1/2006, at 0:01, Andreas Wahlin wrote:
When I use the Command+R, with Safari and FF open, it nicely refreshes safari, but in FF I just get a new blank tab. It might be mentioned that the open .php file isn't the same as the current working URL (which is a good thing in my opinion and it works just as I want with Safari)
The refresh command asks FF to retrieve an URL which uses the javascript scheme to refresh. Maybe this only work for older versions.
Are there any FF users who can tell how to make FF refresh?