Using StringMatch with a text wave

Can anyone help me!?!
I'm trying you use stringmatch with a text wave.
The data I have is from an instrument with 2 inlets which alternate between amplification and background. The software logs which inlet is being amplified at each half second interval(e.g. Operation Mode - Amplification inlet 1). I'd like to use stringmatch on the ith term in the wave containing this information.
Is this in fact possible or do I need to create a string variable and overwrite it each time?
Cheers,
Karen
Try running this example function. I think this demonstrates how to do what you want to do. If not, paste the relevant piece of code you've written that doesn't work and explain why it doesn't work and/or how you expect it to work and I'll see if I can help you.

function test()
    make/o/n=4/t textwave = {"a", "b", "a", "b"}
    Variable n
    For (n=0; n<4; n+=1)
        if (stringmatch(textwave[n], "a"))
            printf "Row %d of wave matched \"a\".\r", n
        else
            printf "Row %d did *not* match \"a\".\r", n
        endif
    EndFor
end