[TxMt] WebKit and Safari (complete)
Juan Falgueras
jfalgueras at uma.es
Thu May 8 10:20:38 UTC 2008
The command ⌘⌥R in HTML mode to open the current doc in runnning
browsers does not work properly (sorry, :)
it does
[[ $(ps -xc|grep Safari) ]] && osascript -e 'tell app "System Events"
to set proclist to name of every application process' -e 'if proclist
contains "Webkit" then' -e 'tell app "Webkit"' -e activate -e "make
new document" -e "set the URL of document 1 to \"$activeURL\"" -e 'end
tell' -e 'end if' -e 'if proclist contains "Safari" then' -e 'tell app
"Safari"' -e activate -e "make new document" -e "set the URL of
document 1 to \"$activeURL\"" -e 'end tell' -e 'end if'
but when you have WebKit running, ps returns you Safari as browser and
then you run Safari !!! side by side with the current running WebKit.
You should open the url via open url in that case or open it looking
for the real browser (Safari or WebKit that is currently running)
- Juan Falgueras
More information about the textmate
mailing list