on menuselect(menuName, itemName)
-- returning false lets the menu command itself run
return false
end menuselect
on postmenuselect(menuName, itemName)
if menuName = "Check" and itemName = "Document Syntax" then
tell application "System Events"
tell process "BBEdit"
if name of window 1 contains "HTML
Syntax Error" then
tell window 1
set warning_checkbox to (name of every checkbox whose name contains "Warning") as text
if value of checkbox warning_checkbox is 1 then
click checkbox warning_checkbox
end if
end tell
end if
end tell
end tell
end if
end postmenuselect
You can still fix the warnings. :-) It's never wrong to entity-encode ampersands in URLs.