--- API: 2.1 OpenSesame: 3.2.5 Platform: nt --- set width 1024 set uniform_coordinates yes set title "New experiment" set subject_parity even set subject_nr 0 set start experiment set sound_sample_size -16 set sound_freq 48000 set sound_channels 2 set sound_buf_size 1024 set round_decimals 2 set height 768 set fullscreen no set form_clicks no set foreground white set font_underline no set font_size 18 set font_italic no set font_family mono set font_bold no set experiment_path "c:\\Program Files (x86)\\OpenSesame\\share\\opensesame_resources\\templates" set disable_garbage_collection yes set description "The main experiment item" set coordinates uniform set compensation 0 set canvas_backend xpyriment set background black define sequence experiment set flush_keyboard yes set description "Runs a number of items in sequence" run stimulus always run new_sketchpad always run new_mousetrap_response always run new_inline_script always define inline_script new_inline_script set description "Executes Python code" ___run__ #if the participant doesn't move the mouse for a range of 30 from the coordinate 0.0 of the screen (center) we want to save that as "No_Response" in our 'current_response' variable. #Otherwise, if the partecipant moves the mouse and hits the first button "left_attempt" or "right_attempt" we want to save it as'left_attempt' or 'right_attempt' depending of the movement direction. #if the partecipant reaches and hits the button "left_response" or "right_response" we want to save it as "left_response" or "right_response" depending on which direction he moved. #We are having trouble because it seems that the mouse never reaches the left_response" or "right_response" button. if var.response_exp_mousetrap_response == None: var.current_response = "No_Response" else: var.current_response = var.response_exp_mousetrap_response __end__ set _prepare "" define mousetrap_response new_mousetrap_response __warning_message__ draw textline text="Please start moving" x=0 y=0 __end__ set update_feedback yes set timeout 1000 set start_coordinates "0;0" set skip_item no set save_trajectories yes set reset_mouse yes set number_of_buttons 4 set mouse_buttons_allowed "left_button;right_button" set max_initiation_time 1000 set logging_resolution 10 set description "Tracks mouse movements" set click_required no set check_initiation_time no set button4 "w=96 x=512 y=384 h=768 name=right_response" set button3 "w=96 x=-512 y=-384 h=768 name=left_response" set button2 "w=384 x=32 y=-384 h=768 name=right_attempt" set button1 "w=-384 x=-32 y=-384 h=768 name=left_attempt" set boundaries "upper=no lower=no left=no right=no" define sketchpad new_sketchpad set duration 0 set description "Displays stimuli" define sketchpad stimulus set duration 200 set description "Displays stimuli" draw textline center=1 color=white font_bold=no font_family=mono font_italic=no font_size=18 html=yes show_if=always text=stimulus x=0 y=0 z_index=0