I have 2 tasks in each trial, and I wish to have each of them be presented on a new screen, not both of them on the same screen. However, if I use codes as below, though when task2 appears, task1 does not show up, but the position of task2 is not on the top of the screen, but in the lower half of the screen. This is a problem, because I have lots of instructions for task2, so I would like to have it presented on the whole screen, not just the lower half. I know in principle I can put the two tasks in two separate newTrials, but in that way I don’t know how to make randomization for ‘trials’ work..
I imagine the code you posted is a trimmed-down version of some other code, because as is, it contains multiple problems: it never prints any element onto the page, there is no newButton commands corresponding to the getButton commands, and the TextInput and Button elements share the same IDs.
From what you describe, there’s probably still an element printed onto the page, possibly a transparent Canvas. Try using the clear command between the two tasks, it should remove all elements on the page at that point