Hey Michael,
Here's the skinny:
I remembered this post but couldn't find it on the board due to the mediocre search, but Google was my friend:
menu AND variable site:http://forum.keyboardmaestro.com
Second link down.
You can do this by resorting to System Events & UI-Scripting:
set topLevelMenu to "Window"
set subMenuItemOne to "Macro Library"
tell application "System Events"
tell application process "Keyboard Maestro"
tell menu item subMenuItemOne of menu 1 of menu bar item topLevelMenu of menu bar 1
if enabled then
click
else
beep
end if
end tell
end tell
end tell
But UI-Scripting is not for the faint of heart. I bought UI Browser long ago to save my hair.
-Chris