• 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: Testing a checkbox status in Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing a checkbox status in Safari


  • Subject: Re: Testing a checkbox status in Safari
  • From: Jim Brandt <email@hidden>
  • Date: Tue, 5 May 2009 15:38:35 -0500

Bryan,

Thanks ... that works perfectly.

Jim


On May 5, 2009, at 3:11 PM, Bryan Vines wrote:

** I don't know if you get the list digest or individual messages. I only sent this to the digest, so I'm sending it to you directly as well. **

Try this code. It assumes the frontmost window is the source window.
It will get the value of the checkbox.
If the value is 1, the checkbox is checked, and the code will uncheck it.
If the value is 0, the checkbox remains unchanged.


activate application "Safari"
tell application "System Events"
tell process "Safari"
set checkBoxValue to get value of checkbox "Hide extension" of sheet 1 of window 1
if checkBoxValue is 1 then click checkbox "Hide extension" of sheet 1 of window 1
end tell
end tell



-- Bryan Vines

_______________________________________________ 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
  • Prev by Date: Re: Testing a checkbox status in Safari
  • Next by Date: Re: Testing a checkbox status in Safari
  • Previous by thread: Re: Testing a checkbox status in Safari
  • Next by thread: Re: Testing a checkbox status in Safari
  • Index(es):
    • Date
    • Thread