Reply To: Comparing Labeled Text Elements

PennController for IBEX Forums Support Comparing Labeled Text Elements Reply To: Comparing Labeled Text Elements

#5079
Jeremy
Keymaster

Hi!

I don’t know why it’s not working, I’d have to double-check that. In the meantime, you can use a Var element as a proxy:

newVar("RespVar"),newVar("LexVar")
,
getText("Resp").setVar("RespVar"),
getText("Lex").setVar("LexVar")
,
getVar("RespVar")
    .test.is( getVar("LexVar") )
    .success(
        newText("Correct!")
            .print()
        ,
        newTimer(1000)
            .start()
            .wait()
        ,
        getVar("Acc").set(1)
    )
    .failure (
        newText("Incorrect!")
            .print()
        ,
        newTimer(1000)
            .start()
            .wait()
        ,
        getVar("Acc").set(0)
    )

Jeremy