• 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: Open Safari in fullscreen and hide toolbar script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Safari in fullscreen and hide toolbar script


  • Subject: Re: Open Safari in fullscreen and hide toolbar script
  • From: Christopher Stone <email@hidden>
  • Date: Sat, 01 Aug 2015 22:27:52 -0500

On Aug 01, 2015, at 08:57, Deivy Petrescu <email@hidden> wrote:
Just a note tab 1 is not necessarily...
______________________________________________________________________

Whups, Deivy is right.

Here's the fix.

------------------------------------------------------------------
set theURL to "http://www.google.com"

tell application "Safari"
  try
    set frontDoc to first window where its document is not missing value

    

    tell frontDoc
      set URL of its document to theURL
      close (tabs whose index is not (get index of current tab))
    end tell

    

    close (windows where it is not frontDoc)

    

  on error
    make new document with properties {URL:theURL}
  end try

  

end tell
------------------------------------------------------------------

--
Best Regards,
Chris

 _______________________________________________
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

References: 
 >Re: Open Safari in fullscreen and hide toolbar script (From: Yvan KOENIG <email@hidden>)
 >Re: Open Safari in fullscreen and hide toolbar script (From: Christopher Stone <email@hidden>)
 >Re: Open Safari in fullscreen and hide toolbar script (From: Yvan KOENIG <email@hidden>)
 >Re: Open Safari in fullscreen and hide toolbar script (From: Yvan KOENIG <email@hidden>)
 >Re: Open Safari in fullscreen and hide toolbar script (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Yosemite and activate failures
  • Next by Date: Re: iTunes 12 "Up Next" GUI Element not accessible with AS
  • Previous by thread: Re: Open Safari in fullscreen and hide toolbar script
  • Next by thread: Re: Open Safari in fullscreen and hide toolbar script
  • Index(es):
    • Date
    • Thread