Can't ask more than 3 random questions

I have a button with javascript code:

switch (prez.variable('poolOne')) {
    case 0:
    prez.showSlideAt(3);
    break;
    case 1:
    prez.showSlideAt(4);
    break;
    case 2:
    prez.showSlideAt(5);
    break;
    case 3:
    prez.showSlideAt(6);
    break;
    case 4:
    prez.showSlideAt(7);
    break;
    case 5:
    prez.showSlideAt(8);
    break;
    case 6:
    prez.showSlideAt(9);
    break;
};

poolOne’s initial value is 0. And when the question is submitted submit button adds to it. So every time they click on the mouse click on the main menu it goes to the next random question but after the third random question (when poolOne variable is 3) the button is becomes diabled and I can’t continue the presentation. I don’t understand why. I set it to disable it when poolOne’s value is 7. Like this on load:

if (prez.variable('poolOne') == 7) {
    prez.object('Mouse Click_7').state('Disabled')
}

(I have 7 random questions.) But it becomes disabled at 3 every time, not 7. Please help me :confused:

I have activepresenter 9 and windows 10.

I just made another mouse click next to the other one that gets disabled after 3, and when I click on it it continued the presentation from poolOne variable’s 4 value. so every mouse click can go to 3 random questions. No matter what I do. Is there an internal setting where I can change this?

Hi Aytug,

It seems that the problem is because the default setting of Attempts of the Mouse Click event is 3.
Please change it to other options (Infinite) to solve your issue.

Also, the Mouse Click event is mainly used for software simulation cases.
Please read the following tutorial for more insights about this feature.

In your case, your project might just need normal buttons or shapes to make it work.

Best,
Quynh Anh

1 Like

Oh, I see. Thank you so much!