Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Returning to a custom form from a sketchpad within a sequence

Hi, I am new to OpenSesame and am trying to figure out if I can set up the experiment as needed.

I have created a custom form (main_form) to appear first in a sequence which presents a calculation task the participants have to complete. Which task appears is directed from the loop to which the sequence belongs.

On the form they have a few different buttons: one to indicate whether they are done with the task and so the participants should not move on to the next task until this button is pressed. Other buttons provide access to different pieces of instructions. If participants press the instruction buttons I want to be able to return to the form (as the task is not finished). But I am having trouble figuring out how to get that accomplished.

I have created the instructions with sketchpad and in the sequence these items are only entered if the button is pressed. So that works fine. But I am not seeing a way where I can tell the sequence to return to the main_form if the finished task button has not been pressed. Instead the program quite naturally considers the trial to be over and presents the next task when I return from the instruction piece I am viewing.

I've tried a few ways to do it without success, and am now trying to use an inline script to direct the program back to the main_form if the variable taskFinished=="no" (this variable is set to yes when Task finished button is pressed). But there doesn't seem to be any way for me to go back to the main_form (none of the commands I thought I might use, such as goto or run seem to work).

Is there anyway for me to get this done? I must admit my programming skills are rusty so it might be something incredibly simple I'm just not seeing. Thank you for any help in advance!

Comments

  • Hi,

    This would require a little inline_script but nothing terribly complicated. Essentially, you can use the items object to explicitly execute items based on specific variables. So for example, say that your control_form sets three variables (task1, task2, and exit), then you could do something like the following:

    while True:
        items.execute('control_form')
        if var.task1 == 'yes':
            items.execute('task1')
        if var.task2 == 'yes':
            items.execute('task2')
        if var.exit == 'yes':
            break
    

    For more information, see:

    I also attached a simple working example.

    Cheers!
    Sebastiaan

  • Thank you Sebastian! This was exactly what I needed and it works. The experiment returns to the form and the right task is set.

    However, one problem has emerged. Once I have pressed one of the instruction buttons and then returned to the main_form the buttons for the instructions on the custom form don't work anymore (the ones I have already pressed at least) - and I can see it on the variable inspection that the form buttons do not get set to "yes" when pressed.

    I want participants to be able to return to the instructions as often as they need while solving the task (this is one dependent variable). I can't find anything that could explain this in the manual - but like with the items object, I might be overlooking something obvious.

  • I was overlooking something obvious! As soon as I posted the comment (after struggling with this for a while) I figured it out. Feel free to ignore the previous post...

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games