Automation Blocks - Selection Confirmation
I'm trying to set up a script that "If" a file is selected, then do something on it, if not, I'd like to throw an error to do something else.

I'm setting up the variable Selected Duration that polls the duration of a selected item (for the A side of the logic), but if nothing is selected, it throws an error.

There is an alert that comes up in the library tab and in the console "execution result:"please select exactly one project item in the project panel (line 1)"". I just want to do something actionable based on this result to fix it since users might not see either of these alerts.
Problem is, I can't seem to find check if something is selected or not. Maybe I'm going about this all wrong by testing the duration of a selection, but I can't figure a way to test if something is selected or not.
Any recommendations on how to solve this would be, as always, appreciated.
