Is it possible to have a macro check a resource and have and or functionality?

Pins are your friend.