Re: Safari Status Bar
Re: Safari Status Bar
- Subject: Re: Safari Status Bar
- From: Nigel Garvey <email@hidden>
- Date: Wed, 12 Oct 2011 07:58:17 +0100
Christopher Stone wrote on Tue, 11 Oct 2011 23:18:02 -0500:
>On Oct 11, 2011, at 22:06, Robert Poland wrote:
>> This seems to error always.
>______________________________________________________________________
>
>Hey Bob,
>
>This works with complete reliability on my machine:
>
>tell application "System Events"
> tell process "Safari"
> tell front window
> try
> properties of static text 1 of group 3
> on error
> keystroke "/" using command down
> end try
> end tell
> end tell
>end tell
>
>How are you running the script?
I get the same result as Bob (Safari 5.1, Mac OS 10.6.8). It errors both
when the status bar is hidden and when it's not, thus toggling the bar
anyway. This has the required effect for me:
tell application "System Events"
tell process "Safari"
set frontmost to true
tell front window
if (class of UI elements of groups does not contain {{static text}}) then keystroke "/" using command down
end tell
end tell
end tell
NG
_______________________________________________
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