Broken button (script). Please help

Why not inserting something like

if not rs.SelectedObjects():
    rs.Command( 'SelAll' )

before the buttons command texts ? :wink: