Millisecond Forums

Help embedding an image

https://forums.millisecond.com/Topic8329.aspx

By LaurenKaiulani - 7/2/2012

Hi everyone,


I'm new to Inquisit and I have a question about embedding an image. My experiment involves a "stressed" and a "non-stressed" condition, in which the "stressed group" takes a typing test with an unreasonably short timer (60 seconds) and the "non-stressed" group takes the same typing test with a longer one (2 and a half min). In addition to setting the allotted times as /timeout, I want to include an actual visual timer for the participants to see. I thought the best way to go about this would be to make .gif animations of the timers and embed them within the page, but I can't seem to get them to show up (the 60 second timer .gif for both passages for the stressed group, and the 2.5 min timer .gif for both passages for the non-stressed group). Any help would be appreciated!



<expt>

/ subjects = (1 of 2)

/ blocks = [1=ac.test.type60]

</expt>


<expt>

/ subjects = (2 of 2)

/ blocks = [1=ac.test.type150]

</expt>


<data>

/columns=[date, time, build, subject, trialcode, blockcode, blocknum, trialnum, latency, response, pretrialpause, 

           posttrialpause, trialtimeout, blocktimeout, correct, stimulusitem, stimulusnumber, 

          display.height, display.width, 

          script.starttime, script.elapsedtime]

/format=tab

</data>


<instruct>

/windowsize = (80%, 80%)

</instruct>


************************************************************************

blocks

***********************************************************************

<block ac.test.type60>

/preinstructions = (ac.test.type.p1)

/trials=[2,4=ac.test.type60; 1,3=ac.test.type.nexttrial]

</block>


<block ac.test.type150>

/preinstructions = (ac.test.type.p1)

/trials=[2,4=ac.test.type150; 1,3=ac.test.type.nexttrial]

</block>



***********************************************************************

ac.test.type

***********************************************************************

<page ac.test.type.p1>In this task, you’ll be racing the clock.^^We’ll give you passages to retype; when you hit enter, a timer will come up indicating how many seconds you have to type the passage.^^Type as much of the passage as you can before the timer runs out.^^If you finish before the timer runs out, please click the "Next" button.</page>


<openended ac.test.type60>

/stimulustimes=[0=ac.test.type60]

/charlimit=2000

/linelength = 80

/timeout=60000

/position = (50%, 75%)

/size = (70%, 40%)

/multiline=true

</openended>


<openended ac.test.type150>

/stimulustimes=[0=ac.test.type150]

/charlimit=2000

/linelength = 80

/timeout=150000

/position = (50%, 75%)

/size = (70%, 40%)

/multiline=true

</openended>


<item 60secondtimer>

/1 = "60secondtimer.gif"

</item>


<picture 60secondtimer>

/items = 60secondtimer

</picture>


<item 150secondtimer>

/1 = "150secondtimer.gif"

</item>


<picture 150secondtimer>

/items = 150secondtimer

</picture>


<text ac.test.type60>

/items=ac.test.type60

/position=(50%,20%)

/select=sequence

/size=(69%,10%)

/fontstyle = ("sans-serif", 12pt, false)

/hjustify=left

</text>


<text ac.test.type150>

/items=ac.test.type150

/position=(50%,20%)

/select=sequence

/size=(69%,10%)

/fontstyle = ("sans-serif", 12pt, false)

/hjustify=left

</text>


<item ac.test.type60>

/1="All the sound reasons ever given for conserving other natural resources apply to the conservation of wildlife, and with three-fold power. When a spendthrift squanders his capital it is lost to him and his heirs; yet it goes somewhere else. When a nation allows any one kind of natural resource to be squandered it must suffer a real, positive loss; yet substitutes of another kind can generally be found. But when wildlife is squandered it does not go elsewhere, like squandered money; it cannot possibly be replaced by any substitute, as some inorganic resources are: it is simply an absolute, dead loss, gone beyond even the hope of recall."

/2="The autobiographer has two qualifications of supreme importance in all literary work. He is writing about a topic in which he is keenly interested, and about a topic upon which he is the highest living authority. It may be reckoned, too, that an autobiography, alone of all books, may be more valuable in proportion to the amount of misrepresentation which it contains. We do not wonder when a man gives a false character to his neighbor, but it is always curious to see how a man contrives to present a false testimonial to himself. It is pleasant to be admitted behind the scenes and trace the growth of that singular phantom which is the man’s own shadow cast upon the colored and distorting mists of memory."

</item>


<item ac.test.type150>

/1="All the sound reasons ever given for conserving other natural resources apply to the conservation of wildlife, and with three-fold power. When a spendthrift squanders his capital it is lost to him and his heirs; yet it goes somewhere else. When a nation allows any one kind of natural resource to be squandered it must suffer a real, positive loss; yet substitutes of another kind can generally be found. But when wildlife is squandered it does not go elsewhere, like squandered money; it cannot possibly be replaced by any substitute, as some inorganic resources are: it is simply an absolute, dead loss, gone beyond even the hope of recall."

/2="The autobiographer has two qualifications of supreme importance in all literary work. He is writing about a topic in which he is keenly interested, and about a topic upon which he is the highest living authority. It may be reckoned, too, that an autobiography, alone of all books, may be more valuable in proportion to the amount of misrepresentation which it contains. We do not wonder when a man gives a false character to his neighbor, but it is always curious to see how a man contrives to present a false testimonial to himself. It is pleasant to be admitted behind the scenes and trace the growth of that singular phantom which is the man’s own shadow cast upon the colored and distorting mists of memory."

</item>


<trial ac.test.type.nexttrial> 

/stimulustimes=[0=ac.test.type.nexttrial]

/validresponse=(28)

</trial>


<text ac.test.type.nexttrial>

/items= ("Press [ENTER] when you are ready for the next trial")

/position=(50%,40%)

</text>


<defaults>

/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)

/ txcolor = black

/ txbgcolor = white

/ windowsize = (99%, 99%)

</defaults>



By Dave - 7/2/2012

You will need to use the <video> element along with /bgstim. See e.g. https://www.millisecond.com/forums/Topic3446.aspx and https://www.millisecond.com/forums/Topic3858.aspx#3858. Alternatively see the <clock> element (new to Inquisit 4).


Regards,


~Dave

By LaurenKaiulani - 7/2/2012

Thanks so much, Dave. I'm using the Web version of Inquisit 4, but I can't seem to find info/instructions for using the <clock> element. Is there a page you could link me to for that?

By Dave - 7/2/2012

You need to download and install the Desktop beta version of Inquisit 4 to access the documentation -- it is not available online yet.

By LaurenKaiulani - 7/3/2012

I'm working with a <clock> element now--is there a way to set it to restart upon each trial? 

By Dave - 7/3/2012

It should automatically reset when used in a <trial> element's /stimulusframes or /stimulustimes:


<clock timer>
/ mode = timer
/ txcolor = yellow
/ txbgcolor = black
/ timeout = 300000
/ position = (50%, 10%)
/ format = "mm:ss"
</clock>

<trial mytrial>
/ stimulusframes = [1=timer]
/ validresponse = (57)
</trial>

<block myblock>
/ trials = [1-3=mytrial]
</block>

By LaurenKaiulani - 7/16/2012

Hi Dave,


I've been piloting this study and it seems that some PC users have been getting a glitch in the typing test--they say that they're only able to type a few letters before the textbox becomes "inactive" (as though it had been clicked out of), requiring them to click back into it every few letters. Is there a way to resolve this?


Thanks!

By LaurenKaiulani - 7/16/2012

And by "textbox," I mean the openended element. Here's the current code for reference: 




<expt>


/ subjects = (1 of 2)


/ blocks = [1=ac.test.type60]


</expt>



<expt>


/ subjects = (2 of 2)


/ blocks = [1=ac.test.type150]


</expt>



<data>


/columns=[date, time, build, subject, trialcode, blockcode, blocknum, trialnum, latency, response, pretrialpause, 


           posttrialpause, trialtimeout, blocktimeout, correct, stimulusitem, stimulusnumber, 


          display.height, display.width, 


          script.starttime, script.elapsedtime]


/format=tab


</data>



<instruct>


/windowsize = (80%, 80%)


</instruct>



************************************************************************


blocks


***********************************************************************


<block ac.test.type60>


/preinstructions = (ac.test.type.p1)


/trials=[2,4=ac.test.type60; 1,3=60secondtimer]


/bgstim=(60sec)


</block>



<block ac.test.type150>


/preinstructions = (ac.test.type.p1)


/trials=[2,4=ac.test.type150; 1,3=150secondtimer]


/bgstim=(150sec)


</block>




***********************************************************************


ac.test.type


***********************************************************************


<page ac.test.type.p1>In this task, you’ll be racing the clock.^^We’ll give you two passages to retype; when you hit enter, a timer will come up in the upper left-hand corner indicating the number of seconds you have to type the passage.^^Type as much of the passage as you can before the timer runs out.^^If you finish before the timer runs out, please click the "Next" button.</page>



<openended ac.test.type60>


/stimulustimes=[0=ac.test.type60]


/charlimit=2000


/linelength = 80


/timeout=60000


/position = (50%, 80%)


/size = (70%, 40%)


/multiline=true


</openended>



<openended ac.test.type150>


/stimulustimes=[0=ac.test.type150]


/charlimit=2000


/linelength = 80


/timeout=150000


/position = (50%, 80%)


/size = (70%, 40%)


/multiline=true


</openended>



<text ac.test.type60>


/items=ac.test.type60


/position=(50%,20%)


/select=sequence


/size=(69%,10%)


/fontstyle = ("sans-serif", 12pt, false)


/hjustify=left


</text>



<text ac.test.type150>


/items=ac.test.type150


/position=(50%,20%)


/select=sequence


/size=(69%,10%)


/fontstyle = ("sans-serif", 12pt, false)


/hjustify=left


</text>



<item ac.test.type60>


/1="All the sound reasons ever given for conserving other natural resources apply to the conservation of wildlife, and with three-fold power. When a spendthrift squanders his capital it is lost to him and his heirs; yet it goes somewhere else. When a nation allows any one kind of natural resource to be squandered it must suffer a real, positive loss; yet substitutes of another kind can generally be found. But when wildlife is squandered it does not go elsewhere, like squandered money; it cannot possibly be replaced by any substitute, as some inorganic resources are: it is simply an absolute, dead loss, gone beyond even the hope of recall."


/2="The autobiographer has two qualifications of supreme importance in all literary work. He is writing about a topic in which he is keenly interested, and about a topic upon which he is the highest living authority. It may be reckoned, too, that an autobiography, alone of all books, may be more valuable in proportion to the amount of misrepresentation which it contains. We do not wonder when a man gives a false character to his neighbor, but it is always curious to see how a man contrives to present a false testimonial to himself. It is pleasant to be admitted behind the scenes and trace the growth of that singular phantom which is the man’s own shadow cast upon the colored and distorting mists of memory."


</item>



<item ac.test.type150>


/1="All the sound reasons ever given for conserving other natural resources apply to the conservation of wildlife, and with three-fold power. When a spendthrift squanders his capital it is lost to him and his heirs; yet it goes somewhere else. When a nation allows any one kind of natural resource to be squandered it must suffer a real, positive loss; yet substitutes of another kind can generally be found. But when wildlife is squandered it does not go elsewhere, like squandered money; it cannot possibly be replaced by any substitute, as some inorganic resources are: it is simply an absolute, dead loss, gone beyond even the hope of recall."


/2="The autobiographer has two qualifications of supreme importance in all literary work. He is writing about a topic in which he is keenly interested, and about a topic upon which he is the highest living authority. It may be reckoned, too, that an autobiography, alone of all books, may be more valuable in proportion to the amount of misrepresentation which it contains. We do not wonder when a man gives a false character to his neighbor, but it is always curious to see how a man contrives to present a false testimonial to himself. It is pleasant to be admitted behind the scenes and trace the growth of that singular phantom which is the man’s own shadow cast upon the colored and distorting mists of memory."


</item>



<trial 60secondtimer> 


/stimulustimes=[0=ac.test.type.nexttrial; 1=60sec]


/validresponse=(28)


</trial>



<trial 150secondtimer> 


/stimulustimes=[0=ac.test.type.nexttrial; 1=150sec]


/validresponse=(28)


</trial>



<clock 60sec>


/ mode = timer


/ txcolor = black


/ txbgcolor = white


/ timeout = 61000


/ format = "mm:ss"


</clock>



<clock 150sec>


/ mode = timer


/ txcolor = black


/ txbgcolor = white


/ timeout = 151000


/ format = "mm:ss"


</clock>



<text ac.test.type.nexttrial>


/items= ("Press [ENTER] to begin")


/position=(50%,40%)


</text>



<defaults>


/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)


/ txcolor = black


/ txbgcolor = white


/ windowsize = (99%, 80%)


</defaults>



By Dave - 7/16/2012

This is a known issue and will be addressed in a future update to the beta.

By LaurenKaiulani - 7/17/2012

Thanks for getting back to me. Is there anything I could do to bypass the glitch? Like using a different element that doesn't encounter this issue? 

By Dave - 7/17/2012

You could use the tried-and-tested <video> approach (see the links in my first reply to this thread), which is not only applicable to Inquisit 3 and below, but also Inquisit 4.

By LaurenKaiulani - 7/17/2012

Sorry for all the questions -- do you mean that using a <video> element would fix the textbox glitch on PCs?

By Dave - 7/17/2012

Yes, that should avoid the issue.

By LaurenKaiulani - 7/17/2012

Last question (hopefully!) -- I'm currently working with the <video> element (as a timer), and though I've tried /stimulusframes and /stimulustimes, I can't get it to reset at the start of each trial (text passage). Here's the code:




<expt>


/ subjects = (1 of 2)


/ blocks = [1=ac.test.type60]


</expt>



<expt>


/ subjects = (2 of 2)


/ blocks = [1=ac.test.type150]


</expt>



<data>


/columns=[date, time, build, subject, trialcode, blockcode, blocknum, trialnum, latency, response, pretrialpause, 


           posttrialpause, trialtimeout, blocktimeout, correct, stimulusitem, stimulusnumber, 


          display.height, display.width, 


          script.starttime, script.elapsedtime]


/format=tab


</data>



<instruct>


/windowsize = (80%, 80%)


</instruct>



************************************************************************


blocks


***********************************************************************


<block ac.test.type60>


/preinstructions = (ac.test.type.p1)


/trials=[1,2=ac.test.type60]


/bgstim = (60sectimer)


</block>



<block ac.test.type150>


/preinstructions = (ac.test.type.p1)


/trials=[1,2=ac.test.type150]


/bgstim = (150sectimer)


</block>




***********************************************************************


ac.test.type


***********************************************************************


<page ac.test.type.p1>In this task, you’ll be racing the clock.^^We’ll give you passages to retype; when you hit enter, a timer will come up indicating how many seconds you have to type the passage.^^Type as much of the passage as you can before the timer runs out.^^If you finish before the timer runs out, please click the "Next" button.</page>



<openended ac.test.type60>


/stimulustimes=[0=ac.test.type60]


/charlimit=2000


/linelength = 80


/timeout=60000


/position = (50%, 75%)


/size = (70%, 40%)


/multiline=true


</openended>



<openended ac.test.type150>


/stimulustimes=[0=ac.test.type150]


/charlimit=2000


/linelength = 80


/timeout=150000


/position = (50%, 75%)


/size = (70%, 40%)


/multiline=true


</openended>



<text ac.test.type60>


/items=ac.test.type60


/position=(50%,20%)


/select=sequence


/size=(69%,10%)


/fontstyle = ("sans-serif", 12pt, false)


/hjustify=left


</text>



<text ac.test.type150>


/items=ac.test.type150


/position=(50%,20%)


/select=sequence


/size=(69%,10%)


/fontstyle = ("sans-serif", 12pt, false)


/hjustify=left


</text>



<item ac.test.type60>


/1="All the sound reasons ever given for conserving other natural resources apply to the conservation of wildlife, and with three-fold power. When a spendthrift squanders his capital it is lost to him and his heirs; yet it goes somewhere else. When a nation allows any one kind of natural resource to be squandered it must suffer a real, positive loss; yet substitutes of another kind can generally be found. But when wildlife is squandered it does not go elsewhere, like squandered money; it cannot possibly be replaced by any substitute, as some inorganic resources are: it is simply an absolute, dead loss, gone beyond even the hope of recall."


/2="The autobiographer has two qualifications of supreme importance in all literary work. He is writing about a topic in which he is keenly interested, and about a topic upon which he is the highest living authority. It may be reckoned, too, that an autobiography, alone of all books, may be more valuable in proportion to the amount of misrepresentation which it contains. We do not wonder when a man gives a false character to his neighbor, but it is always curious to see how a man contrives to present a false testimonial to himself. It is pleasant to be admitted behind the scenes and trace the growth of that singular phantom which is the man’s own shadow cast upon the colored and distorting mists of memory."


</item>



<item ac.test.type150>


/1="All the sound reasons ever given for conserving other natural resources apply to the conservation of wildlife, and with three-fold power. When a spendthrift squanders his capital it is lost to him and his heirs; yet it goes somewhere else. When a nation allows any one kind of natural resource to be squandered it must suffer a real, positive loss; yet substitutes of another kind can generally be found. But when wildlife is squandered it does not go elsewhere, like squandered money; it cannot possibly be replaced by any substitute, as some inorganic resources are: it is simply an absolute, dead loss, gone beyond even the hope of recall."


/2="The autobiographer has two qualifications of supreme importance in all literary work. He is writing about a topic in which he is keenly interested, and about a topic upon which he is the highest living authority. It may be reckoned, too, that an autobiography, alone of all books, may be more valuable in proportion to the amount of misrepresentation which it contains. We do not wonder when a man gives a false character to his neighbor, but it is always curious to see how a man contrives to present a false testimonial to himself. It is pleasant to be admitted behind the scenes and trace the growth of that singular phantom which is the man’s own shadow cast upon the colored and distorting mists of memory."


</item>



<trial 60secondtimer> 


/stimulustimes=[0=60sectimer]


/validresponse=(57)


</trial>



<trial 150secondtimer> 


/stimulustimes=[0=150sectimer]


/validresponse=(57)


</trial>



<video 60sectimer>


/ items = ("60sectimer.mp4")


/ position = (50%, 0%)


/ valign = top


</video>



<video 150sectimer>


/ items = ("150sectimer.mp4")


/ position = (50%, 0%)


/ valign = top


</video>



<defaults>


/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)


/ txcolor = black


/ txbgcolor = white


/ windowsize = (99%, 99%)


</defaults>



By Dave - 7/17/2012

To get it to "reset" for each trial, you have to display the <video> via the respective <openended> element's /stimulusframes. You don't want to use /bgstim and the various <trial> elements a la <trial 60secondtimer> are completely unnecessary (you aren't using them anywhere).


Regards,


~Dave

By LaurenKaiulani - 7/17/2012

Thanks so much for your patience -- I apologize for the newbie questions. The <video> is restarting now, but the text prompt is gone--




<expt>


/ subjects = (1 of 2)


/ blocks = [1=ac.test.type60]


</expt>



<expt>


/ subjects = (2 of 2)


/ blocks = [1=ac.test.type150]


</expt>



<data>


/columns=[date, time, build, subject, trialcode, blockcode, blocknum, trialnum, latency, response, pretrialpause, 


           posttrialpause, trialtimeout, blocktimeout, correct, stimulusitem, stimulusnumber, 


          display.height, display.width, 


          script.starttime, script.elapsedtime]


/format=tab


</data>



<instruct>


/windowsize = (80%, 80%)


</instruct>



************************************************************************


blocks


***********************************************************************


<block ac.test.type60>


/preinstructions = (ac.test.type.p1)


/trials=[1,2=ac.test.type60]


</block>



<block ac.test.type150>


/preinstructions = (ac.test.type.p1)


/trials=[1,2=ac.test.type150]


</block>




***********************************************************************


ac.test.type


***********************************************************************


<page ac.test.type.p1>In this task, you’ll be racing the clock.^^We’ll give you passages to retype; when you hit enter, a timer will come up indicating how many seconds you have to type the passage.^^Type as much of the passage as you can before the timer runs out.^^If you finish before the timer runs out, please click the "Next" button.</page>



<openended ac.test.type60>


/stimulusframes=[1=60sectimer]


/charlimit=2000


/linelength = 80


/timeout=60000


/position = (50%, 75%)


/size = (70%, 40%)


/multiline=true


</openended>



<openended ac.test.type150>


/stimulusframes=[1=150sectimer]


/charlimit=2000


/linelength = 80


/timeout=150000


/position = (50%, 75%)


/size = (70%, 40%)


/multiline=true


</openended>



<text ac.test.type60>


/items=ac.test.type60


/position=(50%,20%)


/select=sequence


/size=(69%,10%)


/fontstyle = ("sans-serif", 12pt, false)


/hjustify=left


</text>



<text ac.test.type150>


/items=ac.test.type150


/position=(50%,20%)


/select=sequence


/size=(69%,10%)


/fontstyle = ("sans-serif", 12pt, false)


/hjustify=left


</text>



<item ac.test.type60>


/1="All the sound reasons ever given for conserving other natural resources apply to the conservation of wildlife, and with three-fold power. When a spendthrift squanders his capital it is lost to him and his heirs; yet it goes somewhere else. When a nation allows any one kind of natural resource to be squandered it must suffer a real, positive loss; yet substitutes of another kind can generally be found. But when wildlife is squandered it does not go elsewhere, like squandered money; it cannot possibly be replaced by any substitute, as some inorganic resources are: it is simply an absolute, dead loss, gone beyond even the hope of recall."


/2="The autobiographer has two qualifications of supreme importance in all literary work. He is writing about a topic in which he is keenly interested, and about a topic upon which he is the highest living authority. It may be reckoned, too, that an autobiography, alone of all books, may be more valuable in proportion to the amount of misrepresentation which it contains. We do not wonder when a man gives a false character to his neighbor, but it is always curious to see how a man contrives to present a false testimonial to himself. It is pleasant to be admitted behind the scenes and trace the growth of that singular phantom which is the man’s own shadow cast upon the colored and distorting mists of memory."


</item>



<item ac.test.type150>


/1="All the sound reasons ever given for conserving other natural resources apply to the conservation of wildlife, and with three-fold power. When a spendthrift squanders his capital it is lost to him and his heirs; yet it goes somewhere else. When a nation allows any one kind of natural resource to be squandered it must suffer a real, positive loss; yet substitutes of another kind can generally be found. But when wildlife is squandered it does not go elsewhere, like squandered money; it cannot possibly be replaced by any substitute, as some inorganic resources are: it is simply an absolute, dead loss, gone beyond even the hope of recall."


/2="The autobiographer has two qualifications of supreme importance in all literary work. He is writing about a topic in which he is keenly interested, and about a topic upon which he is the highest living authority. It may be reckoned, too, that an autobiography, alone of all books, may be more valuable in proportion to the amount of misrepresentation which it contains. We do not wonder when a man gives a false character to his neighbor, but it is always curious to see how a man contrives to present a false testimonial to himself. It is pleasant to be admitted behind the scenes and trace the growth of that singular phantom which is the man’s own shadow cast upon the colored and distorting mists of memory."


</item>



<video 60sectimer>


/ items = ("60sectimer.mp4")


/ position = (50%, 0%)


/ valign = top


</video>



<video 150sectimer>


/ items = ("150sectimer.mp4")


/ position = (50%, 0%)


/ valign = top


</video>



<defaults>


/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)


/ txcolor = black


/ txbgcolor = white


/ windowsize = (99%, 80%)


</defaults>



By Dave - 7/17/2012

The <video> is restarting now, but the text prompt is gone--


That's because you removed it from your /stimulustimes or /stimulusframes respectively.


Before:


<openended ac.test.type60>
/stimulustimes=[0=ac.test.type60]
[...]
</openended>


After:


<openended ac.test.type60>
/stimulusframes=[1=60sectimer]
[...]
</openended>


Correct:


<openended ac.test.type60>

/stimulusframes=[1=60sectimer, ac.test.type60]

[...]

</openended>


You will find basics such as displaying multiple stimuli in a given trial, stimulus timings, etc. covered in the various tutorials included in the Inquisit documentation.


Regards,


~Dave