Howdy, Stranger!

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

Supported by

Launch an OpenSesame program (osexp) via Python subprocess

Hi all!

I'm glad to post for the first time on this supportive OS community (hopefully I can contribute in turn later)!

I have written an experiment in OpenSesame, and I am trying to integrate it within a Python script that would serve as a 'batch-script' for my whole setup. What I mean is that this 'outer' python script is first launching my webcam software (to record my participant throughout the experiment), then it is playing the instruction video on VLC, then the first part of my OS experiment (let's call it part1.osexp), then another video on VLC, then part2.osexp

(I know that I could read the video from OpenSesame with openCV for example, but for several reasons I'd rather not.)

I have figured out how to run the subprocesses for the webcam recording, and for playing videos with VLC. I also figured out how to start OpenSesame with the snippet of code below:


import subprocess

path = 'C:\\Programs\\OpenSesame\\opensesame.exe'

p = subprocess.Popen([path], shell=True)


It works fine to start OpenSesame.


My question is: would it be possible to extend this bit of code to run a particular code (e.g., part1.osexp) without further clic?


Many thanks in advance, this would be immensely helpful! And please let me know if you need more details / if anything is unclear.

I'm also happy to describe the (successful and unsuccessful) attempts at doing any of that, if somebody is interested.

Marie


(NB: I did think of doing all in the OpenSesame script, but I've already spent a lot of time on it, to eventualy get stuck on the impossibility to have my webcam software and/or VLC going in front of the screen. Basically I found another post on this forum suggesting it is not possible to get win32gui installed, which would have been a nice workaround)

Comments

  • Well, I think I managed eventually! I'll leave the answer here in case sb may find it useful someday!

    import subprocess
    soft_path = 'C:\\Programs\\OpenSesame\\opensesamerun.exe'
    file_path = 'C:\\Users\\admin\\Documents\\OSrun\\test.osexp'
    
    subprocess.call([soft_path, file_path, '--fullscreen'], shell=False)
    

    Which can be expanded thanks to the arguments presented here: https://osdoc.cogsci.nl/3.2/manual/opensesamerun/

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