• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Opening Safari tabs one-at-a-time?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening Safari tabs one-at-a-time?


  • Subject: Re: Opening Safari tabs one-at-a-time?
  • From: Richard Wolf <email@hidden>
  • Date: Thu, 21 Aug 2008 15:47:36 -0500

On Aug 21, 2008, at 10:32 AM, Sam Krishna wrote:

Are there any automator actions out there that let me load Safari tabs one at a time? For example, I want to send a batch of URLs to this action, and have the action open each URL in Safari one-at-a- time, waiting until the current tab has finished loading before starting the next tab.

Is there an action out there that lets me do this? Or do I need to roll my own?

Sam,

It is easy, in Cocoa, to open a URL in a user's default browser (Safari, Firefox, whatever). If it didn't exist, I could probably Xcode that action in a couple of hours, maybe less. :) If you have Xcode powers, you probably could as well.

In Cocoa, you'd use this class:

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html

specifically, this method:

http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/Reference/Reference.html#/ /apple_ref/occ/instm/NSWorkspace/openURL:

The openURL methods returns a BOOL stating whether the URL was opened successfully. Since the call is synchronous, you could just loop around it, opening a new URL every time. Whether this would product the desired effect in Safari is a different matter. "What" Safari views as success in opening a URL ... this I don't know. I also don't know "when" it reports success or failure.

Safari has an option, in its preferences, to either open links sent from other apps in a new window, or a tab in an existing window. So a user could just toggle that for the behavior he/she wanted from an Automator workflow.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Automator-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Automating automator
  • Next by Date: Re: Automating automator
  • Previous by thread: Opening Safari tabs one-at-a-time?
  • Next by thread: Automating automator
  • Index(es):
    • Date
    • Thread