 |
 |
Is it possible for safari to launch a new browser
|
 |
|
 |
|
Mac Enthusiast
Join Date: Sep 2003
Status:
Offline
|
|
each time you click the icon in the dock? I guess i am used to ie in win2k, i expect it to launch a new browser each time, but it todesnt so i have to hit apple N.
Any way around this ?
|
|
| MBA Student | MacAddict | CarAddict | PhotoNut | Dork | PhishHead |
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: May 2001
Location: Massachusetts, USA
Status:
Offline
|
|
Okay, you asked... here's one possible answer. It's not entirely perfect, but it's something:
First, open Script Editor and paste in the following AppleScript:
Code:
tell application "Finder"
set safariRunning to process "Safari" exists
tell application "Safari" to activate
if safariRunning then
tell application "Safari"
make new document
end tell
end if
end tell
(The reason for the if statement is that if Safari's not running, it automatically creates a new window when it starts up.)
Compile it, save it in "Application Bundle" format, name it something like " Safari " (with spaces; the script will get confused if it's named "Safari") and give it Safari's icon. Now, whenever you launch the script, its icon will bounce briefly in the Dock and be replaced by Safari's, at which point the script will quit. If you want, you can supress the script's Dock icon by navigating to Contents/Info.plist inside the script's bundle (use "Show Package Contents" in the contextual menu to get here) and adding the following lines to the Info.plist file:
Code:
<key>NSUIElement</key>
<true/>
Now the icon won't show up in the Dock when the script launches. You'll still get two icons in your Dock, but only one of them will have an arrow underneath them, and that'll be the actual browser. It would be nice to be able to just click on Safari's icon and have the script activate, but if that's possible it's well beyond my knowledge of AppleScript. Maybe someone else knows how to do that. In the meantime though, this should tide you over.
|
|
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Sep 2001
Status:
Offline
|
|
Launch a new browser everytime? It's just a new window, unlike Windoze, which actually opens the application all over again, right? Can't you run the same applications a few times if you wanted? Stick with Apple's desktop metaphor. Good ol' centralized menu has yet to fail me.
Never mind. I was confused. And now I'm going to bed.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jul 2002
Status:
Offline
|
|
If Safari doesn't have any opened (or minimized) windows, clicking on the dock icon will open a new window. However, if there is a window already open, clicking Safari's icon should bring it to the front. From there, you can open another window or, better yet, a new tab. I just keep a single window open, hide Safari when I'm not using it, and use Cmd-click to open links in a tab.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|