Text Entry Correct Value Script

Problem: Unable to assign text entry correct values using script.
var obj=prez.object(“text Entry”‘).;
obj.correctValue.add("correctValue’);

ActivePresenter version: 8

OS: 10

Notes:

Hi,

Your question is similar to this thread:

Please check it out for more information.

Regards,

Hi Sir Hang…
Thank you, this will solve what i need although it need two variables…

Hi sir Hang…
How can to apply this solution in the onCorrect event of the text entry?

Hi @Luke54646,

It’s not possible because On Correct event only occurs when the text entry is filled with one of the correct values set in the editor.
If you want to bind those actions with the text entry instead of the Submit button, you can copy them to On Text Enter event of the text entry, and change the text entry submit method to “Press Key” (not Auto).

Regards

Hi @Hang,

I made a simple simulation and add a first slide which ask the students to enter some data and base on their answer I need to set new correct values on text entry. I try your previous suggestion on the code above, but it need to add a another variable in set the code On Text Enter event not on correct answer event. it is possible if you provide a script to set the new correct values of the text entry on the next slide?

Hi @MichaeJen,

In your case, you can assign a text variable (correct_var) to your text entry on the first slide.
image

In slide 2, compare the text input to the correct_var in the On Text Enter event of the Text Entry:
image

Please the attached sample for more information.
Untitled1.approj (2.7 MB)

Regards,
Hang