Hey David,<br><br>I clearly misunderstood what you meant with leftbutton and rightbutton - those are the names of the boxes, I realize now.<br><br>Glad you got that part working. For the changing colors when mouse hoovers over part: I don't think you can really help you with that one - as I never did that myself. <br><br>I do think you might want to use a different set-up in that case. The script that is used to read out the mouseclicklocation is only accessed after the termination of the slide - in order to have anything happening (i.e. mouse location being read out and acted upon during the showing of the slide) you'd need a script that is accessed before the slide and continues during the slide (the do while type loops that you already tried to implement). My gut feeling tells me that such a script might not work with the ready made "buttons" (text/imageboxes), but perhaps it will if you draw the buttons yourself (in that very same script preceding the slide) using canvas drawing commands. <br><br>Attached is a questionnaire script, which I believe evolved from the ratingscale script provided by PST. In the inline preceding the questionslide answerboxes are being drawn, then the slide is shown and then in the inline following the slide, the mouseclick is assessed, the buttoncolour changes and remains visible for a little bit longer, and the response is logged and processed. Clicks outside the answerbuttons load to a backbutton, similar to your set-up. <br><br>What this program does not do is changing the colour of buttons while a mouse hovers over. I think I tried to get it like that "back then" but didn't manage to do so. I then concluded that the slide needs to be terminated, altered and reshown for this to happen and that that simply takes a bit too long to give a natural feeling to the participant operating the mouse (as if the program stalls). However, back then I wasn't much aware of do-while loops, perhaps those may make it possible. Anyone else's input could be useful on that one? :)<br><br><br>Good luck and please let us know if it works out! :)<br><br>Best,<br><br>Anne-Wil <br>On Monday, 16 July 2012 05:32:57 UTC+2, David Wang wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Now I have a new question. The two buttons I used are text boxes (light gray background, Bold black font).<br><br>To make the buttons more realistic, I am trying to have the background color change when my mouse hovers over them.<br><br>No clicking will happen, I simply want the program to monitor the location of the cursor; and when the cursor is over the buttons, the backcolor of the buttons can change.<br><br>I am sorry to bother you again, but I do need help :(<br><br>My thought is to <br><br><br><br>dim leftbutton as rect<br><span style="background-color:rgb(255,255,0)">(is this correct? leftbutton is the string name of a button on the slide.)</span><br><br>Dim curPoint As Point 'mouse over<br>Dim ETTime As Long<br>ETTime = Clock.Read<br>Dim ETTimeInterval As Long<br>ETTimeInterval = 10<br><br><br>'---loop the positioning mechanism before a response is made<br>Do While Slide5.InputMasks.Responses.<wbr>Count = 0<br><br> '=== request eye or mouse data every ETTimeInterval ms<br>If (Clock.Read > ETTime) Then<br><br> 'Set the next log time<br> ETTime = Clock.Read + ETTimeInterval<br><br><br><br><br> '---- highlight AOI ( mouse over )<br> Mouse.GetCursorPos curPoint.x, curPoint.y<br> <br> <br> <br> If PointInRect(curPoint,<wbr>leftbutton ) Then <span style="background-color:rgb(255,255,0)">'This I don't understand. Am i in the right path to make a textbox a rect in the inline, then use it in a pointinrect and color change command?</span><br> leftbutton.BackColor = color.silver<br> leftbutton.Draw<br> Else<br> leftbutton.BackColor = color.gray <br> leftbutton.Draw<br> End If<br> <br><br><br>end if<br>loop<br><br><br></blockquote>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/5Z3nPWevjLsJ">https://groups.google.com/d/msg/e-prime/-/5Z3nPWevjLsJ</a>.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.<br />
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.<br />