• 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: Yvan KOENIG <email@hidden>
  • Date: Sat, 01 Aug 2015 14:31:08 +0200


Le 01/08/2015 à 14:02, Christopher Stone <email@hidden> a écrit :

On Aug 01, 2015, at 03:07, Yvan KOENIG <email@hidden> wrote:
I tried to borrow a piece of code to Christopher Stone but I discovered that it fails if there is no Safari window already open:
______________________________________________________________________

Hey Yvan,

C'mon, you know how to fix that...  :)

--------------------------------------------------------------------------
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 1)
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


Hello Christopher

The main point in my late message was the fact that under El Capitan we have to use two schemes according to the running OS.

Under Yosemite and older, the menu item 1 of menu 5 of Safari is Hide Toolbar or Show Toolbar (not sure of the English wording).
Under El Capitan this menu item is "Always Show Toolbar in Full Screen"
By default this item is checked and disabled (greyed)
It is enabled only when Full screen mode is active.

It's the kind of problem which will probably surface quite often because many users installed the public beta but are unable to solve the problems introduced by changes in apps behavior.

I didn't guess that this may be the problem myself. Happily,at last, in his late message that the asker wrote : Although I¹m currently working on 10.11.


Yvan KOENIG running Yosemite 10.10.4 in French (VALLAURIS, France) samedi 1 août 2015 14:29:36





 _______________________________________________
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: Open Safari in fullscreen and hide toolbar script
      • From: Yvan KOENIG <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>)

  • Prev by Date: Re: Open Safari in fullscreen and hide toolbar script
  • Next by Date: Re: Open Safari in fullscreen and hide toolbar script
  • 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