Howdy, Stranger!

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

Supported by

Modifying contents of a loop table

Hello guys,

I have tricky questions today.

I wonder if it is possible to modify some values in a loop table (the built-in sequence structure) during the execution of the program. Is it also possible to read the contents of an Excel file into the loop table before execution of the program ?

Cheers,

Gérard

Comments

  • Hi Gérard,

    Is it also possible to read the contents of an Excel file into the loop table before execution of the program ?

    Yes, just select file as source for the loop table instead of table

    I wonder if it is possible to modify some values in a loop table

    Yes, that is possible. It is quite trivial to change the values of the current trial. Just set the value of the variable to whichever value you want.

    If you want to change the entire table, you need to access the underlying datatable, which is possible but a little trickier. I think you can access it by items['new_loop'].dm or whatever the loop is called. Allowed operations on that datamatrix object you can check in the dedicated documentation: https://datamatrix.cogsci.nl/

    Hope this helps,

    Eduard

    Buy Me A Coffee

  • Hello Eduard,

    Thank you for your fast reply. I realize that my explanations were not totally clear. Actually, what I want to do is to modify a value of a variable in a row of the table at a certain trial in order to influence the behavior of the program during the next occurence of that row (another trial on the same row).

    In practice, I always use a file as the source of the loop table. That means that I would have to change the value in the Excel file itself, which is possible in theory but would probably be very "heavy". Another solution could be to load the full table from the file into the loop table of the experiment and to make the change in that table. But I don't know how to do that operation - and it is probably what your are referring to in you reply. I shall investigate in that direction but it is not obvious for me because I am not familiar with the 'underwears' of OpenSesame.

    Any additional advise or correction on my perception of the project ?

    Thank you in advance,

    Gérard

  • Hello Eduard,

    Another possibility could be to copy the contents of the loop Excel file into a table in memory using a Python script. I have been able to do that but the question is : is it possible to integrate (copy ?) that table into the regular loop table ? In other terms, I come back to the previous question : is there any possible access to that loop table, other than typing the values inside it ?

    Thank you,

    Gérard

  • Hi Gérard,

    Sounds reasonable. Your situation should be covered by my second scenario. So yeah, you should look into the datamatrix documentation (and search the forum for datamatrix questions).

    Another possibility could be to copy the contents of the loop Excel file into a table

    Sure, you can do that as well. But this won't be much different that directly modifying the loop table with datamatrix. I don't think it matters much whether you do one or the other.

    Good luck!

    Eduard

    Buy Me A Coffee

  • Hi Eduard,

    Because I wanted to keep the core structure and functionnalities of Open Sesame, especially the loop structure, I have created a complementary table in memory, using an index to link that table and the Excel data source file. You might be interested by the following:

    • In order to automate the identification of the Excel file, I have created a variable that I use as the "File" parameter in the loop structure and ... it works (that was not obvious to me).
    • I had tried to create the table in memory using the standard table instructions of Python, but the program was frequently stuck, certainly because of an overload of memory space. The DataMatrix library has solved the problem. It works much better and is very easy to implement. Thank you for the advise !
    • During my search for a solution, I had created a loop structure containing several nested sequences, because of the need for many conditional statements, and I noticed that at the third nesting level, the scope of the first level variables is lost. I guess that there must be a limit in the nesting of sequences. Can you confirm ?

    Thank you again for your support.

    Gérard

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