Is there a way to selecting Menu Title without the Menu Item? If I could insert an IF statement there I feel like I could get it to work. I get the feeling it may be a bit more complicated than that though.
If the menu item changes from “Show Library” to “Hide Library” when the Library is open you can have an IF Then with the condition:
If a menu item named “Hide Library” exists
Do nothing
Otherwise select menu item “Show Library”
Or even simpler, set your “Open Library” Action to not abort the macro or notify on failure using the gear menu in its top right corner. This means the Action will only do anything if the Library is not already open.Otherwise it will fail but the macro will carry on to the next step.
You need to spot a difference between the states when "Show Library" is and isn't selected, then test for those. For example, is the menu item "enabled" (gets a check mark) after you select it? Or does the menu item toggle between "Show Library" and "Hide Library"?
The best way I've found to do this is by dragging and dropping from the Finder. The good news is, you can reliably automate this and it's pretty quick.
Check out Strip Search near the top of this thread.