help--alternating text and image stimuli

Paul Jackson paulj at psy.uq.edu.au
Tue Apr 28 23:02:02 UTC 2009


That code should also finish with:

	Set theImage=Nothing
	Set theText=Nothing

Also you must have a variable named PicsPath set to something (or delete that from the filename bit).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 Paul R. Jackson
 
 Experimental Programmer
 School of Psychology
 University of Queensland
 
 E: paulj at psy.uq.edu.au
 P: 33656950
 W: www.psy.uq.edu.au/~paulj
~~~~~~~~~~~~~~~~~~~~~~~~~~~~


> -----Original Message-----
> From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On
> Behalf Of Paul Jackson
> Sent: Wednesday, 29 April 2009 8:57 AM
> To: e-prime at googlegroups.com
> Subject: RE: help--alternating text and image stimuli
> 
> 
> I am completely flat out at the moment so I can't offer to much time
> BUT I have some code that will do what you want. Basically you add this
> as an inline element at the start of each trial to prepare the stimulus
> slide. It assumes that there is a Slide called 'StimulusStates' which
> contains 2 slide elements 'picStimulus' (SlideImage) and 'txtStimulus'
> (SlideText). Each trial has an attribute called 'Stimulus'. Basically
> if the stimulus attribute text ends in '.bmp' it assumes it is a
> picture and if not that it is text.
> 
> The Code:
> 
> 'Prepare Image or Text
> Dim Stimulus As String
> Dim theImage As SlideImage
> Dim theText As SlideText
> Set theImage =
> CSlideImage(StimulusScreen.States(StimulusScreen.ActiveState).Objects("
> picStimulus"))
> Set theText =
> CSlideText(StimulusScreen.States(StimulusScreen.ActiveState).Objects("t
> xtStimulus"))
> 
> Stimulus=trim(c.GetAttrib("Stimulus"))
> If LCase(Right(Stimulus,4))=".bmp" Then
> 	theImage.Width="100%"
> 	theImage.Height="100%"
> 	theImage.Filename=PicsPath & Stimulus
> 	theImage.Load
> 	theText.Width="0"
> 	theText.Height="0"
> Else
> 	theImage.Width="0"
> 	theImage.Height="0"
> 	theImage.Clear
> 	theText.Width="100%"
> 	theText.Height="100%"
> 	theText.Text=Stimulus
> End If
> 
> 
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
>  Paul R. Jackson
> 
>  Experimental Programmer
>  School of Psychology
>  University of Queensland
> 
>  E: paulj at psy.uq.edu.au
>  P: 33656950
>  W: www.psy.uq.edu.au/~paulj
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> > -----Original Message-----
> > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On
> > Behalf Of liwenna
> > Sent: Wednesday, 29 April 2009 8:43 AM
> > To: E-Prime
> > Subject: Re: help--alternating text and image stimuli
> >
> >
> > not entirely sure if I got your problem right.. but what about simply
> > creating bitmaps that show your text stimuli? Indeed file these all
> in
> > a list under a variable, for instance called "stimulus" and make a
> > slide with a imageobject that calls into the stimulus attribute (use
> > [stimulus] ).
> >
> > Alternatively overlapping text and imageobjects might work if you set
> > them to transparent in the image/text object properties... although I
> > am not entirely sure whether it won't give an error saying that it
> > can't find the text/image to display (just as you suggest it might do
> > ^.^ )
> >
> > Regards (and oh yeah, I didn't answer your e-mail yet, will do soon
> > though)
> >
> > liwenna
> >
> >
> >
> > On Apr 28, 11:07 pm, Rick O'Gorman <rickogor... at gmail.com> wrote:
> > > Hi all,
> > >
> > > I'm guessing this is easy to do if you know how, but I can't figure
> a
> > > solution; the manuals are of little help. I am creating an IAT and
> > want
> > > a mix of images and text as stimuli. I thought I could just put the
> > > image file names in the relevant LIST but this doesn't work. I then
> > > realised that slides have either text or image objects, so I figure
> > I'm
> > > goiung to have to mess around with multiple versions of slides--do
> I
> > use
> > > slidestate? Or can I layer a text object and image object on top of
> > each
> > > other and assume that it is transparent if nothing is called for
> that
> > > implementation? If you've got something that does this can can
> share
> > it,
> > > that would be welcome.
> > >
> > > Cheers,
> > >
> > > Rick
> > > --
> > > Rick O'Gorman, PhD
> > > Psychology, Faculty of Development and Society
> > > Collegiate Crescent Campus,
> > > Sheffield Hallam University,
> > > Sheffield
> > > S10 2BP
> > >
> > > Phone: 0114 225 5788 Fax: 0114 225 2430
> > >
> > > http://www.shu.ac.uk/psychology/staff/OGorman.html
> > >
> > > No passion can survive a woman's seeing her lover hold
> > > his fork in the wrong way.
> > >                                    ~Edith Wharton
> > >
> >
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com
> > Version: 8.5.287 / Virus Database: 270.12.7/2085 - Release Date:
> > 04/28/09 18:02:00
> 
> > 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.287 / Virus Database: 270.12.7/2085 - Release Date:
> 04/28/09 18:02:00

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list