AskBox not showing

75 views
Skip to first unread message

Jonathan Levanon

unread,
Jun 14, 2016, 4:19:52 AM6/14/16
to E-Prime
I have the following code at the end of every block:

Display.canvas.clear
sleep(450)
answer = AskBox$("How many targets did you see?")


Yet, the AskBox does not appear on screen (if i type something and press enter it gets it and moves on).
I tried all combinations of display.usefordialogs and displayflippingEnabled values, and it doesn't seem to work.

Any solutions?

Thanks,

Jonathan

Jonathan Levanon

unread,
Jul 5, 2016, 8:04:37 AM7/5/16
to E-Prime
Anyone?

בתאריך יום שלישי, 14 ביוני 2016 בשעה 11:19:52 UTC+3, מאת Jonathan Levanon:

Anne-Wil

unread,
Jul 7, 2016, 8:01:00 AM7/7/16
to E-Prime
Hi Jonathan,

Your question invoked the memory of a two week long struggle to get answerboxes to work in e-prime (1... this was 15 years ago, scarily enough). I dug up the task from back then and it seems that this code also still works in e-prime 2.

****
Dim Answer As Variant
answer = answerbox ("do you want to contribute", "yes", "no",, "headertext in the top area of the box" )

c.SetAttrib "answergiven", answer
****

In our case back then, the trick turned out to be the double comma to skip the helpfile (I think?) parameter.

In a similar vein, this seems to work for an ask box if you require more than two answer options/ free string answers:


***

Dim Answer As Variant
answer = askbox ("How many targets did you see?","optional preffiled answer suggestion, "headertext In the top area Of the box" )

c.SetAttrib "answergiven", answer
***

If you do not want a prefilled answer suggstion, but do want to have a header title to the box, use double comma to skip the middle parameter. If you want neither you can close the line directly after the prompt question (the defautl header text is "e-run" ).

It may be useful to also add this line " mouse.ShowCursor True " at the top to make sure that the mouse is operable.

That said: we used answerboxes back then because we aimed for the program to not look like an e-prime program, as we tried to deceive our participants into thinking that they were playing against others on other computers. For most other uses I would say that using e-primes 'normal' input options (i.e. enabling an input mask on for instance a slide object, with en echo back to the slide object if you like) would give you easier control over for instance allowable responses (numeric only?) and logging of responses, accuracy, and timing (the above code has a line to log the response given in to the data file, similar lines should be written if you want to log otehr information too, while on a slideobject this would be a more simpler cases of checking a box).

Good luck !

Anne

Anne-Wil

unread,
Jul 7, 2016, 9:32:18 AM7/7/16
to E-Prime
Am aware that the above is not precisely an answer to your question( some additional info like whether this specific script used to work in the past, and your current e-prime version and OS could help).

Yet, just now something sprang in mind: in latest versions of e-prime the default is to execute all online from the start of a procedure rather than wait executing each untill it's preceding object has run. I would expect these communication boxes to be shown OVER any other canvasses (rather than 'underneath' as 'canvas' drawing code is) so this is a bit of a long shot, yet you might as well give it a try: open the specific procedure that this inline is executed at and go to its properties (small 'hand/folder' icon in the upper left corner). At the 'common' tab select the before/after ObjectRun options instead of TopOfProcedure.

If this helps I am not quite sure why that is, but would love to hear if it does!
Reply all
Reply to author
Forward
0 new messages