Howdy, Stranger!

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

Supported by

Can not use variable from one 'form' into another

Hello,

I am trying to create a test in which the participants are given the choice between 7 colors. When they choose the color a list of words will be shown in that specific color. After that I want the participants to write down the words that they remembered, but I want the text that they write to be of the same color. I managed to make the list of words appear in the color selected by the participant but not to make the words that they will write in the same color.

The variable that the form gives me is color_choice which I then use in a sketchpad to change the color of the words like this color="[color_choice]" but then when I want to use it in the form of the text like this** set foreground=[color_choice]** it says that color choice does not exist.

What should I do?

Thank you.

Comments

  • Hi vleid,

    to set the colour of a TextLine stimulus, you need to give it the argument text_colour, which has to be a list with three arguments representing RGB values.

    I am afraid I do not fully understand the rest of your question (e.g. it is not clear to me what "form" and "sketchpad" you are referring to). Maybe you can give an example of the Python code that generates your colour list?

  • Hi fladd,

    define form_multiple_choice new_form_multiple_choice
    set timeout infinite
    set spacing 10
    set question "Please choose a color that your prefferd color from the following list:"
    options
    Blue
    Red
    Yellow
    Green
    Purple
    Orange
    Black
    end
    set margins "50;50;50;50"
    set form_var color_choice #this is the variable in ehich I store the color
    set form_title "Color choice"
    set description "A simple multiple choice item"
    set button_text Ok
    set allow_multiple no
    set advance_immediately no
    set _theme gray

    This is a form from which the color of the words can be chosen.

    define form_text_input new_form_text_input_2
    set timeout infinite
    set spacing 10
    set rows "1;3;5"
    set only_render no
    set margins "50;50;50;50"
    set form_var response
    set form_title "What do you recall"
    set form_question "Please fill in all the words that you remember. Separte the words by a space. Write the words in lower-case letters. Please mind the spellig, words not spelled correctly will not be considered as an correct answer. After you finnish please press ENTER to continue."
    set foreground "self.get"
    set description "A simple text input form"
    set cols 1
    set _theme gray
    widget 0 0 1 1 label text="[form_title]"
    widget 0 1 1 1 label center=no text="[form_question]"
    **widget 0 2 1 1 text_input focus=yes return_accepts=yes stub="" var="[form_var]" ** # I want this text to be the same as the color they have chosen

    and this is the form in which I want them to enter their response.

  • Mmh, this is not Python code. I think you accidentally posted in the wrong forum. This is the forum for Expyriment, which is a Python library for designing and conducting experiments.

    It looks to me that you are using OpenSesame. I will hence move this discussion in the OpenSesame forum.

  • oh, ok 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