Applescript to click menu item in Lightroom 5
Found this which did the trick.  

tell application "System Events" to tell process "Adobe Photoshop Lightroom 5"
set frontmost to true
tell menu bar 1
    tell menu bar item "Photo"
        tell menu "Photo"
            tell menu item "Set Flag"
                tell menu "Set Flag"
                    click menu item "Rejected"
                end tell
            end tell
        end tell
    end tell
end tell
end tell