Looking for a command if something is selected or not


#1

Hi all!
I am trying to do a script who can do two diferent things depending if something is selected or not.
I am looking a command like the “object exists,” let’s say…

if( something is selected ) {
// do this
} else {
// do this instead
}

I hope some guru of mel can help me with this, I coudn’t find anything on the web