AppleScript to open URL in Safari crashes for Flash-based websites

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-06-04T06:22:02Z Indexed on 2010/06/05 7:22 UTC
Read the original article Hit count: 472

Filed under:
|
|
|
|

I'm trying to open a URL in Safari. It works fine for websites without Flash embedded, but crashes Safari for Flash sites.

Example (this WORKS):

tell application "Safari" to open location "http://google.com"

This CRASHES when Safari is not already running:

tell application "Safari" to open location "http://grooveshark.com"

Two things I noticed:

  • Safari only crashes for websites with embedded Flash
  • The script above only crashes if a new instance of Safari is created (i.e. Safari was not running before)

From the second observation I assume that it could be a permission issue of some sort. Maybe the Safari instance launched from the AppleScript has a problem loading plugins?

© Stack Overflow or respective owner

Related posts about flash

Related posts about safari