Conditionally add, remove or change a tag?


Is there a way to conditionally add or remove a tag based upon either its value or the existance of the tag itself? Similarly, I'd like to be able to conditionally modify tags based their value. Some actions I'd like to run across my whole library.

If (NOT TagExists("COMPILATION")) Then

If (ALBUMARTIST == "Various Artists") Then

If (ARTIST == "Cannonball Adderley") Then
  SetTag("ARTIST=Julian Adderley")


The 2nd example is the same as here:
The two others are very similar.
To check if a tag field exist a simple $if(%tag%,yes,no) suffices.


Thanks. Forgot I'd already asked, and I guess I missed the reply.