• 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: Script for Safari open with Script editor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script for Safari open with Script editor


  • Subject: Re: Script for Safari open with Script editor
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 28 Dec 2007 22:57:14 -0700

On Dec 28, 2007, at 9:59 PM, John Koch wrote:

So I want to make it clear is what I want is  : when I run this script that it will open a blank script and one window with -macscripter.com in it

The only ways to ensure that there's only one window open in Safari is to close all windows and then create a new one, or to close all but one window.  The first way is easier.

tell application "Safari"
if (count of windows) is greater than 0 then close windows
tell (make new document) to set URL to "http://www.macscripter.net/"
end tell

Then you can navigate in Macscripter to find the script you want, copy it, and paste it into the Script Editor window, which is what I assume you want the Script Editor window open for.

-- Michelle

--
"The right to be heard does not automatically include the right to be taken seriously." -- Hubert H. Humphrey 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Script for Safari open with Script editor
      • From: John Koch <email@hidden>
References: 
 >Script for Safari open with Script editor (From: John Koch <email@hidden>)

  • Prev by Date: Re: Mail...again!!! :-)
  • Next by Date: Re: Mail: Create New Message script broken on Leopard
  • Previous by thread: Script for Safari open with Script editor
  • Next by thread: Re: Script for Safari open with Script editor
  • Index(es):
    • Date
    • Thread