You can’t test for equality between strings like that. You need to use [StrFind, which will give the starting index of the string if it is found or -1 if it is not. To make sure that we have the string we want it’s also useful to check the string length, in case there’s also a brush called ‘ClayTubes2’ for example.
Also using the [IGetTitle command in its default state for brushes will return the path where the file is stored, so set the arg to 1 so you can be sure of the right string length. You also need to set a variable to the [IGetTitle string as coding something like ([StrFind,“ClayTubes”,[IGetTitle,Brush:Current Brush,1]]>-1) will not work.
//ZBRUSH MACRO - Recorded in ZBrush version 3.5
[IButton,???,"Cycles between ClayTubes and Move brushes",
[IShowActions,0]
[IConfig,3.5]
[VarSet,len,[StrLength,"Brush:ClayTubes"]]
[VarSet,str,[IGetTitle,Brush:Current Brush,1]]
[If,(([StrLength,str] == len)&&([StrFind,"ClayTubes",str]>-1)),
[IPress,Brush: Move]
,
[IPress,Brush: Claytubes]
]
, , .25, , "Brush.bmp", .25]
HTH,