Mouse.GetCursorPos thePoint

Comments

1 comment

  • Avatar
    Devon Struthers

    Hello Olive,

    Great question! Without seeing the rest of your experiment, it's a little difficult to properly diagnose this issue, but I have a few ideas that should help you out with this problem. 

    First,  I recommend checking out PST's sample. It sounds like it does exactly what you want to without having to reinvent the wheel. Check it out here: https://support.pstnet.com/hc/en-us/articles/115001909088-Track-Mouse-Coordinates-30090-.

    To answer your question more directly though, if absolutely nothing is printing to the debug.print screen, it sounds like E-Prime isn't even getting into your While...Wend statement. In general, While...Wend statements have been replaced by Do While or Do...Loop Until Loops. I recommend replacing those. While there's nothing functionally wrong with a While...Wend loop, the Do loops just work a little cleaner in my opinion. 

    Next, let's talk about the conditions stopping it from getting into the While...Wend statement. You have one very important statement there: Clock.ReadMillisec < Test.OnsetTime + Test.Duration. My bet is that one of those three numbers isn't printing what you're expecting. I recommend putting the following script just before your While....Wend Statement:

    Debug.Print "Current time: " & Clock.ReadMIlisec

    Debug.Print "OnsetTime: " & Test.OnsetTime

    Debug.Print "TestDuration: " & Test.Duration

    My guess is that one of these three (probably your "Test." statements are returning values that you're not expecting, causing E-Prime to completely skip over your While...Wend statement. I then recommend keeping those Debug.Print statements in your experiment until the program is working exactly how you want it to. These are going to be useful tools for testing any more assumptions that your script is making.

    If you would like more help with this or any experiment, I do offer consulting services for E-Prime as well. You can check out my site here: https://www.theprimeguyconsulting.com/

    Sincerely,

    Devon "The Prime Guy" Struthers

    Experiment Design Consultant

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk