Re: Testing a checkbox status in Safari
Re: Testing a checkbox status in Safari
- Subject: Re: Testing a checkbox status in Safari
- From: Emmanuel Levy <email@hidden>
- Date: Tue, 5 May 2009 18:18:07 +0200
At 8:39 AM -0500 5/5/09, Jim Brandt wrote:
Is there a way in either System Events or in Safari to check the status of a
checkbox on a sheet opened from a save command of the view source window?
This code:
tell application "System Events"
tell process "Safari"
set nm to name of front window
click checkbox "Hide Extension" of sheet 1 of window nm
end tell
end tell
toggles the checkbox.
I want to do this ONLY if the checkbox is not already checked, otherwise I'm
unchecking it. So, is there a way to test it first?
I would try using Safari's AppleScript "do Javascript" command.
If you do so, be aware that Safari (in fact: Cocoa, but don't spread
the word) does not really know among its windows which is frontmost
and which is not, so prefer working with only one window. Like in the
pre-Multifinder era.
Emmanuel
_______________________________________________
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