• 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: Fri, 31 Jul 2015 17:41:14 +0200


Le 31/07/2015 à 17:36, Ball, Dan <email@hidden> a écrit :

I¹m simply trying to open a webpage with Safari and launching it
fullscreen and hiding the toolbar.  In fullscreen, the option is under the
View Menu and is the first option to hide the toolbar.

I figured you could tell what I was trying to do by looking at the script,
sorry.

Thanks,

Dan

On 7/31/15, 10:54 AM,
"applescript-users-bounces+ball.dan=email@hidden on behalf of
email@hidden"
<applescript-users-bounces+ball.dan=email@hidden on behalf of
email@hidden> wrote:

Message: 3
Date: Fri, 31 Jul 2015 16:54:30 +0200
From: Yvan KOENIG <email@hidden>
To: liste AppleScript US <email@hidden>
Subject: Re: Open Safari in fullscreen and hide toolbar script
Message-ID: <email@hidden" class="">email@hidden>
Content-Type: text/plain; charset="utf-8"


The original script does that.
What is failing is the late block of instructions about which I was wondering.

--delay 10


tell application "Safari"


activate


close every window


open location "http://www.google.com"


end tell


--delay 2


tell application "System Events"


tell process "Safari"
set frontmost to true
try


--click menu item "Enter Full Screen" of menu 1 of menu bar item "View" of menu bar 1
keystroke "f" using {command down, control down}


end try


end tell


end tell


delay 2


tell application "System Events"


tell process "Safari"
set frontmost to true
try


--click menu item "Hide Toolbar" of menu 1 of menu bar item "View" of menu bar 1
click menu item 1 of menu 1 of menu bar item 5 of menu bar 1
end try


end tell


end tell


-- delay 3

(*

tell application "System Events"
tell process "Safari"
set frontmost to true


class of every UI element of window 1
log result --> (*group, group*)
position of group 2 of window 1
log result --> (*0, 0*)
class of UI elements of group 2 of window 1
log result --> (*tab, group*)


-- properties of first tab  of group 2 of window 1 # doesn't compile
properties of first UI element of group 2 of window 1
log result --> (*class:tab, minimum value:missing value, orientation:missing value, position:0, 22, role description:groupe d’onglet, accessibility description:missing value, focused:false, title:missing value, size:1920, 24, value:radio button Google of tab group 1 of group 2 of window Google of application process Safari, help:missing value, enabled:missing value, maximum value:missing value, role:AXTabGroup, entire contents:, subrole:missing value, selected:missing value, name:missing value, description:groupe d’onglet*)
class of UI elements of first UI element of group 2 of window 1
log result --> (*button, radio button*)


class of UI elements of group 1 of group 2 of window 1
log result --> (*group, button, menu button, menu button, menu button, menu button, button, button, button, button, menu button, button, menu button, button, button, button, menu button, button, button*)


title of every menu button of group 1 of group 2 of window 1
log result --> (*Apple, Geek, iOS, stockage, langage, MacPlus, VPC*)


keystroke "f" using {command down, control down}


delay 0.1
perform action "AXShowMenu" of toolbar 1 of group 2 of window 1


key code 125


keystroke return


end tell
end tell
*)

Does what you ask but I wish to know why you posted the useless blocks of instructions ?


Yvan KOENIG (VALLAURIS, France) vendredi 31 juillet 2015 17:41:10


 _______________________________________________
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: "Ball, Dan" <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