[TxMt] Refresh FireFox command

Timothy Martens timfm at hawaii.rr.com
Sat Nov 6 00:41:06 UTC 2004


On Nov 5, 2004, at 11:59 AM, Mats Persson wrote:

> On Nov 5, 2004, at 21:46, Mats Persson wrote:
>> OK, so I am a naughty boy that's getting the missus rather angry now 
>> : )
>>
>> Anyway, here's the AS that does what you want.
>>
>> set theActiveURL to "JavaScript:window.location.reload();"
>> tell application "Firefox"
>> 	activate
>> 	Get URL theActiveURL inside window 1
>> end tell
>>
>> You just need to translate the above into TM command and you're up 
>> and running.
>
> OK, stretching the world peace a little bit here, but the answer came 
> to me. So here it is in FULL working order
>
> 1.	Save the above AS snippet as a AppleScript file  
> /Library/Scripts/TextMate/Firefox-BrowserReload.scpt.  (Or whatever 
> you like)
>
> 2.	Type the following into your "Refresh in Firefox" Command:  
> osascript /Library/Scripts/TextMate/Firefox-BrowserReload.scpt
>
> That's it, it should now work just fine.

I tried this and it launch Firefox but not the file preview. Instead it 
just went to the default home page. The message in teh file I was 
trying to preview says:

/Users/tim/Library/Scripts/FirefoxReload.scpt: execution error: 
firefox-bin got an error: Can't get 
"JavaScript:window.location.reload();". (-1728)

??

  -t




More information about the textmate mailing list