Is it possible to test for a label using @If

I'm trying to make a context menu entry that executes a command if a test for a label is true.
As a starting point I am using Go Up .

I tried this, but it doesn't work. Can it be done ?

@if:Properties SETLABEL=USA ADDLABEL
Go Up
@If:else

You'd need to use scripting for that.

Thanks Leo!
I have a very small start on that.
This is nothing that is useful yet, but at least I figured out how to access them.
Continuing this, maybe I'll look back someday, hopefully soon, and wonder why I was ever so twisted up about it.

function OnClick(clickData)
{
    enumFiles = new Enumerator(clickData.func.sourcetab.selected); 
    enumFiles.moveFirst();
    while (enumFiles.atEnd() == false) 
	     {
	     Tag=enumFiles.item().Labels;
		
         DOpus.Output(Tag[0]);
         enumFiles.moveNext();
         }
}