<?xml version="1.0"?>
<Experiment xmlns:dt="urn:schemas-microsoft-com:datatypes"><General><Version><Major>2</Major><Minor>0</Minor><Internal>10</Internal><Build>252</Build><_VersionPersist dt:dt="int">200</_VersionPersist></Version></General><ExperimentObject><Guid dt:dt="string">{0C80FE58-7092-41BB-8B1F-2671F4C8DF96}</Guid><Root dt:dt="string">SessionProc</Root><Name dt:dt="string"></Name><Author dt:dt="string"></Author><Abstract dt:dt="string"></Abstract><Notes dt:dt="string"></Notes><ClockGuid dt:dt="string">{10343DBD-55BE-45C7-AA62-A5239F6918AB}</ClockGuid><ClockIndex dt:dt="int">0</ClockIndex><ClockScale dt:dt="r8">1</ClockScale><VersionMajor dt:dt="int">1</VersionMajor><VersionMinor dt:dt="int">0</VersionMinor><VersionInternal dt:dt="int">0</VersionInternal><VersionBuild dt:dt="int">14</VersionBuild><VersionAutoIncrement dt:dt="boolean">1</VersionAutoIncrement><CreationDateUtc dt:dt="dateTime">2017-10-19T16:15:26.000</CreationDateUtc><Features dt:dt="int">536870912</Features><Devices><Device><Name dt:dt="string">Display</Name><Class dt:dt="string">Display</Class><DeviceObject><_VersionPersist dt:dt="int">1</_VersionPersist><OpenDevice dt:dt="int">-1</OpenDevice><RTAdjustment dt:dt="int">0</RTAdjustment><Width dt:dt="int">640</Width><Height dt:dt="int">480</Height><BitsPerPixel dt:dt="int">32</BitsPerPixel><DefaultColor dt:dt="string">white</DefaultColor><DisplayIndex dt:dt="int">1</DisplayIndex><RefreshRateRequested dt:dt="int">0</RefreshRateRequested><MinAcceptableRefreshRate dt:dt="int">39</MinAcceptableRefreshRate><MaxAcceptableRefreshRate dt:dt="int">201</MaxAcceptableRefreshRate><DefaultSettingsUsed dt:dt="string">No</DefaultSettingsUsed><BadRefreshErrorUsed dt:dt="string">No</BadRefreshErrorUsed><FlippingEnabled dt:dt="boolean">1</FlippingEnabled><RefreshAlignment dt:dt="string">25%</RefreshAlignment></DeviceObject></Device><Device><Name dt:dt="string">Keyboard</Name><Class dt:dt="string">Keyboard</Class><DeviceObject><_VersionPersist dt:dt="int">1</_VersionPersist><OpenDevice dt:dt="int">-1</OpenDevice><CollectionMode dt:dt="int">1</CollectionMode><EmulateDeviceName dt:dt="string"></EmulateDeviceName><SystemAbortWatchSequence dt:dt="string"></SystemAbortWatchSequence><UserBreakStateSequence dt:dt="string"></UserBreakStateSequence><ConditionalExitSequence dt:dt="string"></ConditionalExitSequence><RTAdjustment dt:dt="int">0</RTAdjustment><CapsLock dt:dt="boolean">0</CapsLock><NumLock dt:dt="boolean">1</NumLock></DeviceObject></Device><Device><Name dt:dt="string">Mouse</Name><Class dt:dt="string">Mouse</Class><DeviceObject><_VersionPersist dt:dt="int">1</_VersionPersist><OpenDevice dt:dt="int">-1</OpenDevice><CollectionMode dt:dt="int">1</CollectionMode><EmulateDeviceName dt:dt="string"></EmulateDeviceName><SystemAbortWatchSequence dt:dt="string"></SystemAbortWatchSequence><UserBreakStateSequence dt:dt="string"></UserBreakStateSequence><ConditionalExitSequence dt:dt="string"></ConditionalExitSequence><RTAdjustment dt:dt="int">0</RTAdjustment><OpenMode dt:dt="int">0</OpenMode><ShowCursor dt:dt="boolean">0</ShowCursor></DeviceObject></Device><Device><Name dt:dt="string">Sound</Name><Class dt:dt="string">Sound</Class><DeviceObject><_VersionPersist dt:dt="int">1</_VersionPersist><OpenDevice dt:dt="int">-1</OpenDevice><RTAdjustment dt:dt="int">0</RTAdjustment><API dt:dt="string">DirectSound</API></DeviceObject></Device></Devices><Packages/><DataFile><WarnBeforeOverwrite dt:dt="int">-1</WarnBeforeOverwrite><WarnIfConvertFailed dt:dt="int">-1</WarnIfConvertFailed><RemoveERecoveryFile dt:dt="int">0</RemoveERecoveryFile><ReceiveFeedbackDuringDataFileConversion dt:dt="int">-1</ReceiveFeedbackDuringDataFileConversion><DataFileName dt:dt="string"></DataFileName><LogLevels><LogLevel dt:dt="string">Block</LogLevel><LogLevel dt:dt="string">Trial</LogLevel><LogLevel dt:dt="string">SubTrial</LogLevel><LogLevel dt:dt="string">LogLevel5</LogLevel><LogLevel dt:dt="string">LogLevel6</LogLevel><LogLevel dt:dt="string">LogLevel7</LogLevel><LogLevel dt:dt="string">LogLevel8</LogLevel><LogLevel dt:dt="string">LogLevel9</LogLevel><LogLevel dt:dt="string">LogLevel10</LogLevel></LogLevels></DataFile><StartupInfo><DisplaySummary dt:dt="boolean">1</DisplaySummary><UseDefaults dt:dt="boolean">0</UseDefaults><LoadStartupInfo dt:dt="boolean">1</LoadStartupInfo><StartupInfoItems><StartupInfoItem><Name dt:dt="string">Subject</Name><Prompt dt:dt="string">Please enter the Subject Number (0=No Data Logging):</Prompt><DataType dt:dt="int">0</DataType><Enabled dt:dt="int">-1</Enabled><PromptEnabled dt:dt="int">-1</PromptEnabled><Default dt:dt="string">1</Default><Min dt:dt="int">0</Min><Max dt:dt="int">2147483647</Max></StartupInfoItem><StartupInfoItem><Name dt:dt="string">Session</Name><Prompt dt:dt="string">Please enter the Session Number (1-32767):</Prompt><DataType dt:dt="int">0</DataType><Enabled dt:dt="int">-1</Enabled><PromptEnabled dt:dt="int">-1</PromptEnabled><Default dt:dt="string">1</Default><Min dt:dt="int">1</Min><Max dt:dt="int">32767</Max></StartupInfoItem><StartupInfoItem><Name dt:dt="string">Group</Name><Prompt dt:dt="string">Please enter Subject's Group (0-32767):</Prompt><DataType dt:dt="int">0</DataType><Enabled dt:dt="int">0</Enabled><PromptEnabled dt:dt="int">0</PromptEnabled><Default dt:dt="string">1</Default><Min dt:dt="int">0</Min><Max dt:dt="int">32767</Max></StartupInfoItem><StartupInfoItem><Name dt:dt="string">Name</Name><Prompt dt:dt="string">Please enter Subject's Name:</Prompt><DataType dt:dt="int">1</DataType><Enabled dt:dt="int">0</Enabled><PromptEnabled dt:dt="int">0</PromptEnabled><Default dt:dt="string"></Default><MaxLength dt:dt="int">255</MaxLength></StartupInfoItem><StartupInfoItem><Name dt:dt="string">Age</Name><Prompt dt:dt="string">Please enter Subject's Age (0-150):</Prompt><DataType dt:dt="int">0</DataType><Enabled dt:dt="int">0</Enabled><PromptEnabled dt:dt="int">0</PromptEnabled><Default dt:dt="string">0</Default><Min dt:dt="int">0</Min><Max dt:dt="int">150</Max></StartupInfoItem><StartupInfoItem><Name dt:dt="string">Sex</Name><Prompt dt:dt="string">Please enter Subject's Sex:</Prompt><DataType dt:dt="int">2</DataType><Enabled dt:dt="int">0</Enabled><PromptEnabled dt:dt="int">0</PromptEnabled><Default dt:dt="string">male</Default><Choices><Choice dt:dt="string">male</Choice><Choice dt:dt="string">female</Choice></Choices></StartupInfoItem><StartupInfoItem><Name dt:dt="string">Handedness</Name><Prompt dt:dt="string">Enter Subject's Handedness:</Prompt><DataType dt:dt="int">2</DataType><Enabled dt:dt="int">0</Enabled><PromptEnabled dt:dt="int">0</PromptEnabled><Default dt:dt="string">left</Default><Choices><Choice dt:dt="string">left</Choice><Choice dt:dt="string">right</Choice></Choices></StartupInfoItem><StartupInfoItem><Name dt:dt="string">ResearcherID</Name><Prompt dt:dt="string">Please enter Researcher's ID:</Prompt><DataType dt:dt="int">0</DataType><Enabled dt:dt="int">0</Enabled><PromptEnabled dt:dt="int">0</PromptEnabled><Default dt:dt="string">1</Default><Min dt:dt="int">0</Min><Max dt:dt="int">32767</Max></StartupInfoItem></StartupInfoItems></StartupInfo></ExperimentObject><StudioItems><StudioItem><Name dt:dt="string">SessionProc</Name><TypeName dt:dt="string">Procedure</TypeName><Tag dt:dt="string"></Tag><Notes dt:dt="string"></Notes><ObjectData><Guid dt:dt="string">{B9B12B4C-959A-468F-B188-BCB116860F14}</Guid><Version><Major>2</Major><Minor>0</Minor><Internal>10</Internal><Build>254</Build><_VersionPersist dt:dt="int">201</_VersionPersist></Version><LoggingItems/><ItemList><Item dt:dt="string">RecalculateRefreshRate</Item></ItemList><DeviceList/><LogData dt:dt="boolean">1</LogData><FlushDataLog dt:dt="boolean">0</FlushDataLog><GenerateLabels dt:dt="boolean">1</GenerateLabels><ProcessPendingInputMasks dt:dt="int">0</ProcessPendingInputMasks><GeneratePreRun dt:dt="int">2</GeneratePreRun><GeneratePostRun dt:dt="int">2</GeneratePostRun><FlowItems><FlowItem><Name dt:dt="string">RecalculateRefreshRate</Name><TypeName dt:dt="string">InLine</TypeName></FlowItem></FlowItems></ObjectData></StudioItem><StudioItem><Name dt:dt="string">RecalculateRefreshRate</Name><TypeName dt:dt="string">InLine</TypeName><Tag dt:dt="string"></Tag><Notes dt:dt="string"></Notes><ObjectData><Guid dt:dt="string">{7372D0AA-63BD-4759-AE37-D0EA312FFA6C}</Guid><Version><Major>2</Major><Minor>0</Minor><Internal>10</Internal><Build>262</Build><_VersionPersist dt:dt="int">1</_VersionPersist></Version><LoggingItems/><DeviceList/><Code dt:dt="string">' Constants to avoid "script too large to be compiled" on experiments with numerous objects
Const cSessionProc = ebUCase_S &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_s &amp; ebLCase_i &amp; ebLCase_o &amp; ebLCase_n &amp; ebUCase_P &amp; ebLCase_r &amp; ebLCase_o &amp; ebLCase_c 
Const cErrUnableToFindSessionProc = ebUCase_U &amp; ebLCase_n &amp; ebLCase_a &amp; ebLCase_b &amp; ebLCase_l &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_o &amp; ebSpace &amp; ebLCase_f &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_d &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_o &amp; ebLCase_p &amp; ebSpace &amp; ebUCase_S &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_s &amp; ebLCase_i &amp; ebLCase_o &amp; ebLCase_n &amp; ebUCase_P &amp; ebLCase_r &amp; ebLCase_o &amp; ebLCase_c &amp; ebSpace &amp; ebLCase_o &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_s &amp; ebLCase_t &amp; ebLCase_a &amp; ebLCase_r &amp; ebLCase_t &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_g &amp; ebSpace &amp; ebUCase_P &amp; ebLCase_r &amp; ebLCase_o &amp; ebLCase_c &amp; ebLCase_e &amp; ebLCase_d &amp; ebLCase_u &amp; ebLCase_r &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_o &amp; ebLCase_b &amp; ebLCase_j &amp; ebLCase_e &amp; ebLCase_c &amp; ebLCase_t 
Const cRecalculateRefreshRate = ebUCase_R &amp; ebLCase_e &amp; ebLCase_c &amp; ebLCase_a &amp; ebLCase_l &amp; ebLCase_c &amp; ebLCase_u &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebUCase_R &amp; ebLCase_e &amp; ebLCase_f &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_h &amp; ebUCase_R &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e 
Const cRecalculateRefreshRateNotFirst = ebUCase_P &amp; ebLCase_l &amp; ebLCase_e &amp; ebLCase_a &amp; ebLCase_s &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_v &amp; ebLCase_e &amp; ebLCase_r &amp; ebLCase_i &amp; ebLCase_f &amp; ebLCase_y &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_h &amp; ebLCase_a &amp; ebLCase_t &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_h &amp; ebLCase_e &amp; ebSpace &amp; ebUCase_R &amp; ebLCase_e &amp; ebLCase_c &amp; ebLCase_a &amp; ebLCase_l &amp; ebLCase_c &amp; ebLCase_u &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebUCase_R &amp; ebLCase_e &amp; ebLCase_f &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_h &amp; ebUCase_R &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebUCase_F &amp; ebLCase_i &amp; ebLCase_r &amp; ebLCase_s &amp; ebLCase_t &amp; ebSpace &amp; ebUCase_I &amp; ebLCase_n &amp; ebUCase_L &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_a &amp; ebLCase_p &amp; ebLCase_p &amp; ebLCase_e &amp; ebLCase_a &amp; ebLCase_r &amp; ebLCase_s &amp; ebSpace &amp; ebLCase_f &amp; ebLCase_i &amp; ebLCase_r &amp; ebLCase_s &amp; ebLCase_t &amp; ebSpace &amp; ebLCase_i &amp; ebLCase_n &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_h &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_e &amp; ebLCase_x &amp; ebLCase_p &amp; ebLCase_e &amp; ebLCase_r &amp; ebLCase_i &amp; ebLCase_m &amp; ebLCase_e &amp; ebLCase_n &amp; ebLCase_t &amp; ebSpace &amp; ebUCase_S &amp; ebLCase_t &amp; ebLCase_r &amp; ebLCase_u &amp; ebLCase_c &amp; ebLCase_t &amp; ebLCase_u &amp; ebLCase_r &amp; ebLCase_e 
Const cFlippingRequired = ebUCase_D &amp; ebLCase_i &amp; ebLCase_s &amp; ebLCase_p &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_y &amp; ebSpace &amp; ebLCase_r &amp; ebLCase_e &amp; "-" &amp; ebLCase_d &amp; ebLCase_e &amp; ebLCase_t &amp; ebLCase_e &amp; ebLCase_c &amp; ebLCase_t &amp; ebSpace &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_f &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_h &amp; ebSpace &amp; ebLCase_r &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_n &amp; ebLCase_o &amp; ebLCase_t &amp; ebSpace &amp; ebLCase_s &amp; ebLCase_u &amp; ebLCase_p &amp; ebLCase_p &amp; ebLCase_o &amp; ebLCase_r &amp; ebLCase_t &amp; ebLCase_e &amp; ebLCase_d &amp; ebSpace &amp; ebLCase_s &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_c &amp; ebLCase_e &amp; ebSpace &amp; ebUCase_D &amp; ebLCase_i &amp; ebLCase_s &amp; ebLCase_p &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_y &amp; ebUCase_D &amp; ebLCase_e &amp; ebLCase_v &amp; ebLCase_i &amp; ebLCase_c &amp; ebLCase_e &amp; ebDot &amp; ebUCase_F &amp; ebLCase_l &amp; ebLCase_i &amp; ebLCase_p &amp; ebLCase_p &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_g &amp; ebUCase_E &amp; ebLCase_n &amp; ebLCase_a &amp; ebLCase_b &amp; ebLCase_l &amp; ebLCase_e &amp; ebLCase_d &amp; ebSpace &amp; ebLCase_i &amp; ebLCase_s &amp; ebSpace &amp; ebLCase_n &amp; ebLCase_o &amp; ebLCase_t &amp; ebSpace &amp; ebLCase_l &amp; ebLCase_o &amp; ebLCase_g &amp; ebLCase_i &amp; ebLCase_c &amp; ebLCase_a &amp; ebLCase_l &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_r &amp; ebLCase_u &amp; ebLCase_e &amp; ebDot &amp; ebSpace &amp; ebSpace &amp; ebUCase_D &amp; ebLCase_i &amp; ebLCase_s &amp; ebLCase_p &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_y &amp; ebUCase_D &amp; ebLCase_e &amp; ebLCase_v &amp; ebLCase_i &amp; ebLCase_c &amp; ebLCase_e &amp; ebDot &amp; ebUCase_N &amp; ebLCase_a &amp; ebLCase_m &amp; ebLCase_e &amp; ebSpace &amp; "=" &amp; ebSpace 
Const cUnableToRecalculateRefreshRate = ebUCase_U &amp; ebLCase_n &amp; ebLCase_a &amp; ebLCase_b &amp; ebLCase_l &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_o &amp; ebSpace &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_c &amp; ebLCase_a &amp; ebLCase_l &amp; ebLCase_c &amp; ebLCase_u &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_f &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_h &amp; ebSpace &amp; ebLCase_r &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e 
Const cRefreshRateFormat = ebDigit_0 &amp; ebDot &amp; ebDigit_0 &amp; ebDigit_0 &amp; ebDigit_0 
Const cDotRefreshRate = ebDot &amp; ebUCase_R &amp; ebLCase_e &amp; ebLCase_f &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_h &amp; ebUCase_R &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e 
Const cDotRefreshRateValidTime = ebDot &amp; ebUCase_R &amp; ebLCase_e &amp; ebLCase_f &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_h &amp; ebUCase_R &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebDot &amp; ebUCase_V &amp; ebLCase_a &amp; ebLCase_l &amp; ebLCase_i &amp; ebLCase_d &amp; ebUCase_T &amp; ebLCase_i &amp; ebLCase_m &amp; ebLCase_e 
Const cBasicDriverInUse = ebUCase_T &amp; ebLCase_h &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_c &amp; ebLCase_a &amp; ebLCase_l &amp; ebLCase_c &amp; ebLCase_u &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebLCase_d &amp; ebSpace &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_f &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_h &amp; ebSpace &amp; ebLCase_d &amp; ebLCase_u &amp; ebLCase_r &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_i &amp; ebLCase_o &amp; ebLCase_n &amp; ebSpace &amp; ebLCase_i &amp; ebLCase_s &amp; ebSpace &amp; ebLCase_a &amp; ebLCase_p &amp; ebLCase_p &amp; ebLCase_r &amp; ebLCase_o &amp; ebLCase_x &amp; ebLCase_i &amp; ebLCase_m &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebLCase_l &amp; ebLCase_y &amp; ebSpace &amp; ebDigit_6 &amp; ebDigit_4 &amp; ebLCase_h &amp; ebLCase_z &amp; ebSpace &amp; ebLCase_w &amp; ebLCase_h &amp; ebLCase_i &amp; ebLCase_c &amp; ebLCase_h &amp; ebSpace &amp; ebLCase_m &amp; ebLCase_a &amp; ebLCase_y &amp; ebSpace &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_d &amp; ebLCase_i &amp; ebLCase_c &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_h &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_u &amp; ebLCase_s &amp; ebLCase_a &amp; ebLCase_g &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_o &amp; ebLCase_f &amp; ebSpace &amp; ebUCase_M &amp; ebLCase_i &amp; ebLCase_c &amp; ebLCase_r &amp; ebLCase_o &amp; ebLCase_s &amp; ebLCase_o &amp; ebLCase_f &amp; ebLCase_t &amp; ebSpace &amp; ebUCase_B &amp; ebLCase_a &amp; ebLCase_s &amp; ebLCase_i &amp; ebLCase_c &amp; ebSpace &amp; ebUCase_D &amp; ebLCase_i &amp; ebLCase_s &amp; ebLCase_p &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_y &amp; ebSpace &amp; ebUCase_A &amp; ebLCase_d &amp; ebLCase_a &amp; ebLCase_p &amp; ebLCase_t &amp; ebLCase_e &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_w &amp; ebLCase_h &amp; ebLCase_i &amp; ebLCase_c &amp; ebLCase_h &amp; ebSpace &amp; ebLCase_h &amp; ebLCase_a &amp; ebLCase_s &amp; ebSpace &amp; ebLCase_b &amp; ebLCase_e &amp; ebLCase_e &amp; ebLCase_n &amp; ebSpace &amp; ebLCase_s &amp; ebLCase_h &amp; ebLCase_o &amp; ebLCase_w &amp; ebLCase_n &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_o &amp; ebSpace &amp; ebLCase_e &amp; ebLCase_m &amp; ebLCase_u &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_d &amp; ebLCase_i &amp; ebLCase_s &amp; ebLCase_p &amp; ebLCase_l &amp; ebLCase_a &amp; ebLCase_y &amp; ebSpace &amp; ebLCase_o &amp; ebLCase_p &amp; ebLCase_e &amp; ebLCase_r &amp; ebLCase_a &amp; ebLCase_t &amp; ebLCase_i &amp; ebLCase_o &amp; ebLCase_n &amp; ebLCase_s &amp; ebSpace &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_s &amp; ebLCase_u &amp; ebLCase_l &amp; ebLCase_t &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_g &amp; ebSpace &amp; ebLCase_i &amp; ebLCase_n &amp; ebSpace &amp; ebLCase_p &amp; ebLCase_o &amp; ebLCase_o &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_i &amp; ebLCase_m &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_g &amp; ebDot &amp; ebSpace &amp; ebSpace &amp; ebUCase_T &amp; ebLCase_o &amp; ebSpace &amp; ebLCase_a &amp; ebLCase_v &amp; ebLCase_o &amp; ebLCase_i &amp; ebLCase_d &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_h &amp; ebLCase_i &amp; ebLCase_s &amp; ebSpace &amp; ebLCase_e &amp; ebLCase_r &amp; ebLCase_r &amp; ebLCase_o &amp; ebLCase_r &amp; "," &amp; ebSpace &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_s &amp; ebLCase_t &amp; ebLCase_a &amp; ebLCase_l &amp; ebLCase_l &amp; ebSpace &amp; ebLCase_a &amp; ebSpace &amp; ebLCase_m &amp; ebLCase_a &amp; ebLCase_n &amp; ebLCase_u &amp; ebLCase_f &amp; ebLCase_a &amp; ebLCase_c &amp; ebLCase_t &amp; ebLCase_u &amp; ebLCase_r &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_v &amp; ebLCase_i &amp; ebLCase_d &amp; ebLCase_e &amp; ebLCase_o &amp; ebSpace &amp; ebLCase_d &amp; ebLCase_r &amp; ebLCase_i &amp; ebLCase_v &amp; ebLCase_e &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_f &amp; ebLCase_o &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_y &amp; ebLCase_o &amp; ebLCase_u &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_g &amp; ebLCase_r &amp; ebLCase_a &amp; ebLCase_p &amp; ebLCase_h &amp; ebLCase_i &amp; ebLCase_c &amp; ebLCase_s &amp; ebSpace &amp; ebLCase_a &amp; ebLCase_d &amp; ebLCase_a &amp; ebLCase_p &amp; ebLCase_t &amp; ebLCase_e &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_o &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_r &amp; ebLCase_e &amp; ebLCase_m &amp; ebLCase_o &amp; ebLCase_v &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_h &amp; ebLCase_e &amp; ebSpace &amp; ebDigit_6 &amp; ebDigit_4 &amp; ebLCase_h &amp; ebLCase_z &amp; ebSpace &amp; ebLCase_c &amp; ebLCase_h &amp; ebLCase_e &amp; ebLCase_c &amp; ebLCase_k &amp; ebSpace &amp; ebLCase_a &amp; ebLCase_f &amp; ebLCase_t &amp; ebLCase_e &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_u &amp; ebLCase_s &amp; ebLCase_i &amp; ebLCase_n &amp; ebLCase_g &amp; ebSpace &amp; ebLCase_h &amp; ebLCase_a &amp; ebLCase_r &amp; ebLCase_d &amp; ebLCase_w &amp; ebLCase_a &amp; ebLCase_r &amp; ebLCase_e &amp; ebSpace &amp; ebLCase_t &amp; ebLCase_o &amp; ebSpace &amp; ebLCase_v &amp; ebLCase_e &amp; ebLCase_r &amp; ebLCase_i &amp; ebLCase_f &amp; ebLCase_y &amp; ebSpace &amp; ebLCase_y &amp; ebLCase_o &amp; ebLCase_u &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_g &amp; ebLCase_r &amp; ebLCase_a &amp; ebLCase_p &amp; ebLCase_h &amp; ebLCase_i &amp; ebLCase_c &amp; ebSpace &amp; ebLCase_a &amp; ebLCase_d &amp; ebLCase_a &amp; ebLCase_p &amp; ebLCase_t &amp; ebLCase_e &amp; ebLCase_r &amp; ebSpace &amp; ebLCase_p &amp; ebLCase_e &amp; ebLCase_r &amp; ebLCase_f &amp; ebLCase_o &amp; ebLCase_r &amp; ebLCase_m &amp; ebLCase_a &amp; ebLCase_n &amp; ebLCase_c &amp; ebLCase_e &amp; ebDot 

Dim theProcedure As Procedure
Set theProcedure = CProcedure(Rte.GetObject(cSessionProc))

' In the event this error fires the main procedure is not SessionProc then the experiment author 
' can update the value Of cSessionProc To the name Of the first Procedure In your Structure
If theProcedure Is Nothing Then Rte.AbortExperiment -999, cErrUnableToFindSessionProc

' Determine if the RecalculateRefreshRate is the first item to run in the experiment Structure
Dim bRecalculateRefreshRateFirst As Boolean
If theProcedure.ChildObjectCount &gt; 0 Then
	If theProcedure.GetChildObjectName(1) = cRecalculateRefreshRate Then bRecalculateRefreshRateFirst = True
End If

If Not bRecalculateRefreshRateFirst Then Rte.AbortExperiment -999, cRecalculateRefreshRateNotFirst

' Enumerate through open display devices and determine if the refresh rate needs recalculated
Dim nDevice As Long
For nDevice = 1 To Rte.DeviceManager.GetDeviceCount

	Dim theDisplayDevice As DisplayDevice
	Set theDisplayDevice = CDisplayDevice(Rte.DeviceManager.GetDevice(nDevice))
	If Not theDisplayDevice Is Nothing Then
	
		If theDisplayDevice.GetState() = ebStateOpen Then
			
			' The recalculation workaround is only supported when flipping
			If Not theDisplayDevice.FlippingEnabled Then Rte.AbortExperiment -999, cFlippingRequired &amp; theDisplayDevice.Name			
	
			' Do we need to recalculate the refresh rate?
			If theDisplayDevice.CalculatedRefreshRate &lt; 50 Then
				
				' Force the screen to paint something (must be done twice)
				theDisplayDevice.Canvas.SetPixel 0, 0, theDisplayDevice.Canvas.GetPixel(0, 0)	
				theDisplayDevice.Canvas.SetPixel 0, 0, theDisplayDevice.Canvas.GetPixel(0, 0)	
				
				' Recalculate the refresh rate
				theDisplayDevice.CalculateRefreshRate 1000
				
			End If
			
			' Validate that we have a valid refresh rate before proceeding
			If theDisplayDevice.CalculatedRefreshRate &lt; 50 Then Rte.AbortExperiment -999, cUnableToRecalculateRefreshRate		
			
			' Attempt to detect Microsoft Basic Display Adapter which typically emulates display operations at 64hz
			If theDisplayDevice.CalculatedRefreshRate &gt;= 63 And theDisplayDevice.CalculatedRefreshRate &lt;= 65 Then Rte.AbortExperiment -999, cBasicDriverInUse			
					
			' Log the recalculated refresh rate and when so that data prior to the time can be thrown out
			c.SetAttrib theDisplayDevice.Name &amp; cDotRefreshRate, Format(theDisplayDevice.CalculatedRefreshRate, cRefreshRateFormat)
			c.SetAttrib theDisplayDevice.Name &amp; cDotRefreshRateValidTime, Clock.Read
		
		End If
		
	End If

Next</Code></ObjectData></StudioItem></StudioItems><UserScript dt:dt="string"></UserScript></Experiment>
