Stop mouseUp response
Posted: Thu Jan 26, 2017 4:29 pm
Hello all.
I am experiencing an issue with part of the program I have created.
This program displays 4 faces randomly one at a time 30 times each. In between the presentation of each face, participants are asked to press a button to indicate the first letter of the name belonging to the face. Here is the code for each of the buttons:
THIS IS THE CODE FOR THE LETTER BUTTONS
HERE IS THE ISSUE: During the presentation of the face, if the participant clicks where the buttons will appear, the program does not stop to let them to choose a button. It acts as if the button was selected and skips to the next face.
I have tried disabling the buttons, hiding the buttons, and creating a toggle in between the presentation of the button.
THIS IS THE CODE FOR THE SHOW FACES BUTTON
In sum,
The program:
Displays a Face
then
Displays four Buttons (W,J,D, and A)
When clicking one of those buttons the program advances to the next face.
While the face is displayed, if the participant clicks in the area where the buttons are, the mouseUp responses is saved until the buttons appear, and then the program automatically advances to the next face.
----I have also tried putting an invisible button in the way of the other buttons. This does not work.-----
Thank you!
I am experiencing an issue with part of the program I have created.
This program displays 4 faces randomly one at a time 30 times each. In between the presentation of each face, participants are asked to press a button to indicate the first letter of the name belonging to the face. Here is the code for each of the buttons:
THIS IS THE CODE FOR THE LETTER BUTTONS
Code: Select all
global gToggle
on mouseUp
if gToggle is 1 then #this code is to turn on the button
send mouseup to button "ShowFace" #this sends the command to show the face
else
pass mouseUp
end if
end mouseUp
on mouseDoubleUp
# do nothing
end mouseDoubleUp
HERE IS THE ISSUE: During the presentation of the face, if the participant clicks where the buttons will appear, the program does not stop to let them to choose a button. It acts as if the button was selected and skips to the next face.
I have tried disabling the buttons, hiding the buttons, and creating a toggle in between the presentation of the button.
THIS IS THE CODE FOR THE SHOW FACES BUTTON
Code: Select all
global gToggle
on mouseUp
put 2 into gToggle
set the cursor to none
hide button "ShowFace"
#these are the letter buttons
hide button "A"
hide button "W"
hide button "J"
hide button "D"
disable button "W"
disable button "J"
disable button "D"
disable button "A"
###this is where the display picture code is, leaving out for simplicity###
end mouseUp
In sum,
The program:
Displays a Face
then
Displays four Buttons (W,J,D, and A)
When clicking one of those buttons the program advances to the next face.
While the face is displayed, if the participant clicks in the area where the buttons are, the mouseUp responses is saved until the buttons appear, and then the program automatically advances to the next face.
----I have also tried putting an invisible button in the way of the other buttons. This does not work.-----
Thank you!