Howdy, Stranger!

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

Supported by

[open] help with sketchpad

edited December 2013 in OpenSesame

Hello, i'm building a quite simple experiment with one categorial variable. This variable represent a simple arrow directing either to the right or to the left (two levels). I tried to draw this two arrows and defined them in the "experimental loop" by the name "arrows" with two levels of right and left. Furthermore i defined anothr variable of correct response: L for the right arrow and S for the left arrow. Also i pointed for 2 cycles (for this two levels of arrow variable) with 50 repeated trails (a whole of 100 trails for a sequence). The only thing is that i couldnt find the way to for applying a random representation of those two types of arrows in the trial sequence. I would appriciate any help about this.

Rotem

Comments

  • Hi Rotem

    I think it is a better idea to define both variables in the block_loop, and run both of the arrows in the same trial sequence. To make sure that the order of the arrow direction is random, and only one arrow is shown per trial, you could the square-bracket method in combination with Run-if statements.

    More precisely:

    image

    image

    Does that make sense?

    An example experiment can be downloaded here (change the extension to .opensesame and open as normally):

    For more information, see:

    Please don't hesitate to ask any further questions!

    Cheers,

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited 8:01AM

    Hey Lotje,
    Thanks a lot for your detailed answer. That was really helpful!
    I now completed building the experiment and tried to fully run it.
    Unfortunately i recieved the following message:

    "An unexpected error occurred, which was not caught by OpenSesame. This should not happen! Message:
    The picture file 'arrowdisplayright' does not exist".

    What is the problem to your opinion?

    I have 3 blocks in my experiment. The only difference between them are the instructions.

    Regrding the instructions- i tried writing them in hebrew but open-sesame did not recognize it. Is there any option to solve this?

    Thanks again for your help,
    Rotem.

  • edited December 2013

    hi
    for hebrew instruction I am using either:

    1. print the instruction in PPT slide - save it as PNG and then using the pic
    2. download release 2.8 - the Hebrew language works great
    3. changing the text font to Hrebrew font - like ROD

    regarding the pic - is the file in your file pool?
    Dror

  • edited 8:01AM

    Hey Dror,
    Thanks for your help. I will follow your instructions regarding Hebrew.
    The pic id not on my file pool. I draw it in sesame and didn't upload it.
    Should I put it in my file pool? How can I do that?
    Rotem.

  • edited 8:01AM

    hi
    I tried to run Lotje exp and it worked fine
    if you still cant find the problem, upload the exp and I would be happy to help
    Dror

  • edited December 2013

    Hey, I managed to solve the problem (it was something i edited in the script and forgot to change back). Anyway, the experiment is running fine now except two last things:

    1. When i run the experiment the instructions disappear only if i press twice on the space key and the arrows (left or right) correspond only if i press twice on each one of the correct response keys (it can be twice "L", twice "S", "S,L", "L,S"). In the block loop i have two variables: 1. arrows (left, right) 2. correct_response (S,L). In the keyboard response in the trailsequence i didnt wrote anything in the "correct response" and wrote 'S;L' in the "allowed response". Would appreciate youe help regarding this one.
    2. Regarding the Hebrew- I have in the "font family" only- MONO, SANS, SERIF and no ROD. Where can i download version 2.8.0?

    Rotem.

  • edited December 2013
    1. change the sketchpad duration before every keyboard response to 0 instead of "keypress"
    2. you can download from http://osdoc.cogsci.nl/getting-opensesame/development-snapshots/
    3. you can change to "rod" in the "other" section.
  • edited 8:01AM

    Thanks again!
    Couldn't find the "other" section. I only have the three options i mentioned before. Where can i find it?
    Another thing, if i replicated a trial sequence to other blocks but now i want to differentiate them in the instructions level or any other level, how can i cancel the connection between them?

  • edited December 2013

    two options to the instruction part:

    1. create a new loop and seq and use the "append existing item" and put all of your seq inside except for the new sketchpad with the instructions.
    2. put all the instructions in the seq and use the "run if" option, for example run if - "count_block_loop = 1" for the block 1 instructions and so on.

    for the Hebrew part:

    1. download 2.8 (it is very easy to use)

    edit: if you still prefer to use older version then 2.8:
    in the sketchpad edit the text object (right click-->edit) and change the font family to any hebrew font (e.g. rod),
    pay attention that if you use Hebrew words as variables values they would be displayed reversed and you need to change it with a little inline script:
    add at the beginning of the trail an inline and in the prepare phase put
    exp.set('VAR_NAME',self.get('VAR_NAME')[::-1])
    hope it helps
    Dror

  • edited 8:01AM

    A small tip: As of 2.8.0 it should no longer be necessary to flip strings around as Dror suggests (although it's in principle a fine solution).

    Bi-directional-text support is new and largely untested though, so let me know if you encounter any issues.

  • edited 8:01AM

    I couldn't see the option for download of version 2.8-they write the following: "Currently, work is being done on OpenSesame 2.8.0 Gutsy Gibson". There is only pre-release packages or sould i go to Github website?

  • edited 8:01AM

    Hey Dror,
    I tried the two options you gave me regarding the heberw issue.
    From some reason i couldn't find the proper link in snapshots page for downloading version 2.8.
    I also edited the family font to rod but sesame exhibited the text in a miror view.
    Would appreciate your help again.
    Rotem.

  • edited 8:01AM

    http://files.cogsci.nl/software/opensesame/pre-releases/
    and download the latest pre (currently 11)

    if you download 2.8 the mirror problem will be solved if you mark "bi-directional-language-support"

    if you still want to use older version you can check lotje in-line script she posted
    http://forum.cogsci.nl/index.php?p=/discussion/280/solved-hebrew-text/p1

  • edited 8:01AM

    Hey, i downloaded 2.8 and marked the "bi-directional...". The Hebrew is working fine now except that the "rod" font somtimes disappear from the sketchpad script after i already edited it and open sesame is giving me an error window during . How can i solve this problem?

  • Hi Rotem,

    Could you please provide us with

    • your sketchpad script
    • and the error message?

    Cheers,

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited December 2013

    Hey,

    This is my sketchpad script for my insructions in the first block.
    Please notice that the font family is empty after it was already specified to "rod" and disappeared again.

    set foreground "black"
    set font_size "18"
    set description "Presents a display consisting of text"
    set maxchar "50"
    set align "center"
    __content__
    ברוכים הבאים לניסוי,
    בפנייך תוצג אחת משתי האפשרויות הבאות:
    חץ המצביע ימינה או חץ המצביע שמאלה.
    בעת הופעת חץ המצביע ימינה, עלייך ללחוץ על מקש ה- L בעזרת יד ימין.
    בעת הופעת חץ המצביע שמאלה, עלייך ללחוץ על מקש ה-S בעזרת יד שמאל.
    בבקשה מקם/מקמי את אצבעותייך על גבי המקשים הרלוונטיים טרם תחילת הניסוי.
    לחץ/לחצי על כל מקש על מנת להתחיל בניסוי.
    __end__
    set background "white"
    set duration "keypress"
    set font_family ""
    

    This is the error message:

    Unexpected error
    line: 87
    exception message: Font '' not found!
    exception type: IOError
    
    Traceback (also in debug window):
      File "dist\libqtopensesame\runners\inprocess_runner.py", line 36, in execute
      File "dist\libopensesame\experiment.py", line 296, in run
      File "dist\libopensesame\sequence.py", line 108, in prepare
      File "C:\Users\Rotem\Desktop\opensesame_2.8.0~pre11-win32-1\plugins\text_display\text_display.py", line 102, in prepare
      File "dist\openexp\_canvas\xpyriment.py", line 294, in textline
      File "dist\openexp\_canvas\xpyriment.py", line 267, in text_size
      File "C:\Users\Rotem\Desktop\opensesame_2.8.0~pre11-win32-1\expyriment\stimuli\_textline.py", line 87, in __init__
    IOError: Font '' not found!
    
  • edited December 2013

    hi
    I tried to write your experiment in my computer and it worked fine with minor changes:

    1. mark the "bi-directional..." - (as you already did)
    2. choose in the same page in the font family - hebrew

    don't change anything else - don't edit and change to "rod" it is only good for earlier versions.

    hope it helps
    dror

  • edited 8:01AM

    I did all the above but still have the same error announcement. Sould i leave the: " set font_family "" " in the sketchpad script empty?

  • edited 8:01AM

    I ment "text display" not sketchpad

  • edited December 2013

    ok , i see the problems
    I'll try to play a little bit and will see how to define it exactly

  • edited 8:01AM

    Thanks! waiting for your reply :)

  • edited 8:01AM

    hi here is an experiment that works
    there are some problems with Hebrew but I will post it in a different discussion
    important- sometimes font family -"" appears - just delete it and it will work
    I used font family davis +bi directional, ant in the text display I left it blank
    http://pastebin.com/394ySNWq

  • edited 8:01AM

    Hey Dror, i think i did everything you said. In the main page i applied david + bi....
    In all my text displays, i left "font family" empty and also deleted in the scripts the "set font_family "". Then i ran the experiment and the hebrew worked great but the next time i tried it, the "set font_family "" jumped back to the scripts and again the error massage about the font :(

  • edited January 2014

    Hi, i already applied the instructions through sketchpad after i saved them as png forms.
    Its working fine though i still have the same font problem, probably because of the blank screens i'm using after the fixation and at the end of a trial. Anyway, here is my experiment. Hope this would help for solving the problem.

    # Generated by OpenSesame 2.8.0~pre11 (Gutsy Gibson)
    # Wed Dec 25 14:46:49 2013 (nt)
    # <http://www.cogsci.nl/opensesame>
    
    set mouse_backend "xpyriment"
    set subject_parity "even"
    set height "720"
    set font_family "David"
    set font_italic "no"
    set synth_backend "legacy"
    set title "Inhibition Manipulation"
    set coordinates "relative"
    set start "experiment"
    set sampler_backend "legacy"
    set transparent_variables "no"
    set foreground "black"
    set font_bold "no"
    set description "Default description"
    set background "white"
    set font_size "32"
    set keyboard_backend "legacy"
    set canvas_backend "xpyriment"
    set compensation "0"
    set bidi "yes"
    set subject_nr "0"
    set width "1280"
    
    define sketchpad arrowright
        set duration "0"
        set description "Displays stimuli"
        draw line -96 0 96 0 penwidth=7 color=black show_if="always"
        draw line 96 0 0 -64 penwidth=7 color=black show_if="always"
        draw line 96 0 0 64 penwidth=7 color=black show_if="always"
    
    define sketchpad instructions0
        set duration "keypress"
        set description "Displays stimuli"
        draw image 0 0 "0.png" scale=1 center=1 show_if="always"
    
    define feedback feedback
        set duration "keypress"
        set reset_variables "yes"
        set description "Provides feedback to the participant"
        draw textline 0 0 "מהר מידיי" center=1 color=black font_family="rod" font_size=32 font_italic=no font_bold=no show_if="always" html="yes"
    
    define sketchpad instructions2
        set duration "keypress"
        set description "Displays stimuli"
        draw image 0 0 "2.png" scale=1 center=1 show_if="always"
    
    define sketchpad instructions3
        set duration "keypress"
        set description "Displays stimuli"
        draw image 0 0 "3.png" scale=1 center=1 show_if="always"
    
    define sketchpad fixation
        set duration "250"
        set description "Displays stimuli"
        draw line 0 -37 0 37 penwidth=7 color=black show_if="always"
        draw line -32 0 32 0 penwidth=7 color=black show_if="always"
    
    define sequence blocksequence
        run blockloop "always"
        run feedback "always"
        run brake "always"
    
    define loop blockloop
        set repeat "10"
        set description "Repeatedly runs another item"
        set item "trailsequence"
        set column_order "arrows;correct_response"
        set cycles "2"
        set order "random"
        setcycle 0 correct_response "yes"
        setcycle 0 arrows "right"
        setcycle 1 correct_response "no"
        setcycle 1 arrows "left"
        run trailsequence
    
    define advanced_delay delay250
        set duration "250"
        set jitter "0"
        set description "Waits for a specified duration"
        set jitter_mode "Std. Dev."
    
    define loop dependentloop
        set repeat "100"
        set description "Repeatedly runs another item"
        set item "blocksequence"
        set column_order "practice"
        set cycles "2"
        set order "random"
        setcycle 0 practice "yes"
        setcycle 1 practice "no"
        run blocksequence
    
    define loop practiceloop
        set repeat "10"
        set description "Repeatedly runs another item"
        set item "blocksequence"
        set column_order ""
        set cycles "2"
        set order "random"
        run blocksequence
    
    define sequence experiment
        run instructions0 "always"
        run practiceloop "always"
        run instructions1 "always"
        run measurmentloop "always"
        run instructions2 "always"
        run manipulationloop "always"
        run instructions3 "always"
        run dependentloop "always"
        run end "always"
    
    define sketchpad brake
        set duration "keypress"
        set description "Displays stimuli"
        draw image 0 0 "brake.png" scale=1 center=1 show_if="always"
    
    define loop manipulationloop
        set repeat "100"
        set description "Repeatedly runs another item"
        set item "blocksequence"
        set column_order "practice"
        set cycles "2"
        set order "random"
        setcycle 0 practice "yes"
        setcycle 1 practice "no"
        run blocksequence
    
    define sequence trailsequence
        run fixation "always"
        run blank "always"
        run delay250 "always"
        run arrowright "[arrows]=right"
        run arrowleft "[arrows]=left"
        run arrow_response "always"
        run blank "always"
        run delay250 "always"
    
    define text_display blank
        set foreground "black"
        set font_size "32"
        set description "Presents a display consisting of text"
        set maxchar "50"
        set align "center"
        set content "Enter your text here."
        set background "white"
        set duration "keypress"
        set font_family ""
    
    define sketchpad end
        set duration "keypress"
        set description "Displays stimuli"
        draw image 0 0 "end.png" scale=1 center=1 show_if="always"
    
    define keyboard_response arrow_response
        set allowed_responses "S;L"
        set description "Collects keyboard responses"
        set timeout "5000"
        set flush "yes"
    
    define loop measurmentloop
        set repeat "50"
        set description "Repeatedly runs another item"
        set item "blocksequence"
        set column_order "practice"
        set cycles "2"
        set order "random"
        setcycle 0 practice "yes"
        setcycle 1 practice "no"
        run blocksequence
    
    define sketchpad arrowleft
        set duration "0"
        set description "Displays stimuli"
        draw line 96 0 -96 0 penwidth=7 color=black show_if="always"
        draw line 0 -64 -96 0 penwidth=7 color=black show_if="always"
        draw line -96 0 0 64 penwidth=7 color=black show_if="always"
    
    define sketchpad instructions1
        set duration "keypress"
        set description "Displays stimuli"
        draw image 0 0 "1.png" scale=1 center=1 show_if="always"
    
  • edited 8:01AM

    change text display blank from text display item to sketchpad
    it should do the trick
    and if not and you can paste your exp in pastebin.com and provide the link it would be great
    Dror

  • edited 8:01AM

    here's the link
    http://pastebin.com/8gAdkZTb
    if this won't work i'll do the same trick for the blank screens as i did for the instructions and change the text display with sketchpad items.
    thanks...

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