Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Easily use Safari with updated WebKit' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Easily use Safari with updated WebKit
Authored by: neilio on Jun 24, '05 02:15:14PM

I'm not sure I totally understand this hint. Why not just create an applescript that runs the included shell script that the updated Webkit comes with?

on run
	set cmd to "/FULL-PATH-To/Webkit/WebKitTools/Scripts/run-safari > /dev/null 2>&1&"
	do shell script cmd
	quit
end run

Save this as a script application and that's it - running this will launch Safari using the built webkit on your system.

---
Slumming at http://www.beatnikpad.com/

[ Reply to This | # ]

Easily use Safari with updated WebKit
Authored by: stephenj on Jun 25, '05 12:03:40PM
Just a little more elegant of a script:
on pscheck()
tell application "System Events"
return (get name of every process)
end tell
end pscheck

set e to my pscheck()
if e does not contain "Safari" then
try
do shell script "`locate run-safari | grep Scripts`" & "> /dev/null 2>&1 &"
on error
do shell script "`mdfind run-safari | grep Scripts`" & "> /dev/null 2>&1 &"
end try
else
tell application "Safari"
activate
end tell
end if

tell me
quit
end tell


---
This will find out your path to the run-safari script and will only launch one instance of it.
I use locate to find the script first and if locate's db isn't updated I use mdfind (spotlight).
So this should work for anyone...

---
if by chance or circumstance...

[ Reply to This | # ]