vb实现 心理学实验 IAT内隐联想测试
生活随笔
收集整理的這篇文章主要介紹了
vb实现 心理学实验 IAT内隐联想测试
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
vb實(shí)現(xiàn) 心理學(xué)實(shí)驗(yàn) IAT內(nèi)隱聯(lián)想測(cè)試
<![if supportMisalignedColumns]> <![endif]>
| Form1 | Caption | IAT測(cè)驗(yàn) | |
| StartUpPositon | 2 | ||
| Command1 | Caption | 開始 | |
| Label1 | Caption | 十 | |
| Font | 粗體72 | ||
| Visible | FALSE | ||
| Label2 | Caption | ||
| Font | 粗體72 | ||
| Visible | FALSE | ||
| Label3 | Caption | √ | |
| Font | 粗體72 | ||
| ForeColor | &H0000FF00& | ||
| Visible | FALSE | ||
| Label4 | Caption | × | |
| Font | 粗體72 | ||
| ForeColor | &H000000FF& | ||
| Visible | FALSE | ||
| Text1 | Locked | TRUE | |
| MultiLine | TRUE | ||
| Text | 指導(dǎo)語 | ||
| Timer1 | Enabled | FALSE | |
| Timer2 | Enabled | FALSE | |
| Interval | 10 | ||
| Timer3 | Enabled | FALSE | |
| Interval | 500 | ||
Option Explicit Dim f%, x%, y%, z%, temp%, r% Dim a$(15)Private Sub Command1_Click() Open "數(shù)據(jù).txt" For Output As 1 f = 1 r = 1 Randomize a(0) = "美好的" a(1) = "可愛的" a(2) = "幸福的" a(3) = "輕松的" a(4) = "快樂的" a(5) = InputBox("目前專業(yè)關(guān)鍵詞1", "主試輸入") a(6) = InputBox("目前專業(yè)關(guān)鍵詞2", "主試輸入") a(7) = InputBox("目前專業(yè)關(guān)鍵詞3", "主試輸入") a(8) = "丑陋的" a(9) = "厭惡的" a(10) = "痛苦的" a(11) = "沉重的" a(12) = "悲傷的" a(13) = InputBox("其他專業(yè)關(guān)鍵詞1", "主試輸入") a(14) = InputBox("其他專業(yè)關(guān)鍵詞2", "主試輸入") a(15) = InputBox("其他專業(yè)關(guān)鍵詞3", "主試輸入") Text1.Visible = False Command1.Visible = False Label1.Visible = True Timer1.Interval = Int(Rnd * 2500 + 500) Timer1.Enabled = True End SubPrivate Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 70 Or KeyCode = 74 Then Timer2.Enabled = False Label2.Visible = False If f = 1 Then If r = 0 Then GoTo a temp = 3 a: r = 0 If KeyCode = 70 And x <= 7 Then Label3.Visible = True ElseIf KeyCode = 70 And x >= 8 Then Label4.Visible = True ElseIf KeyCode = 74 And x <= 7 Then Label4.Visible = True ElseIf KeyCode = 74 And x >= 8 Then Label3.Visible = True End If ElseIf f = 2 Then If r = 0 Then GoTo b temp = 20 b: r = 0 If KeyCode = 70 And x <= 7 Then Label3.Visible = True Print #1, 1, x, y * 10 ElseIf KeyCode = 70 And x >= 8 Then Label4.Visible = True Print #1, 0, x, y * 10 ElseIf KeyCode = 74 And x <= 7 Then Label4.Visible = True Print #1, 0, x, y * 10 ElseIf KeyCode = 74 And x >= 8 Then Label3.Visible = True Print #1, 1, x, y * 10 End If ElseIf f = 3 Then If r = 0 Then GoTo c temp = 3 c: r = 0 If (x <= 4 Or x >= 13) And KeyCode = 70 Then Label3.Visible = True ElseIf x <= 12 And x >= 5 And KeyCode = 70 Then Label4.Visible = True ElseIf (x <= 4 Or x >= 13) And KeyCode = 74 Then Label4.Visible = True ElseIf x <= 12 And x >= 5 And KeyCode = 74 Then Label3.Visible = True End If ElseIf f = 4 Then If r = 0 Then GoTo d temp = 20 d: r = 0 If (x <= 4 Or x >= 13) And KeyCode = 70 Then Label3.Visible = True Print #1, 1, x, y * 10 ElseIf x <= 12 And x >= 5 And KeyCode = 70 Then Label4.Visible = True Print #1, 0, x, y * 10 ElseIf (x <= 4 Or x >= 13) And KeyCode = 74 Then Label4.Visible = True Print #1, 0, x, y * 10 ElseIf x <= 12 And x >= 5 And KeyCode = 74 Then Label3.Visible = True Print #1, 1, x, y * 10 End If End If Timer3.Enabled = True End If End SubPrivate Sub Timer1_Timer() Timer1.Enabled = False If f < 5 Then x = Int(Rnd * 15) y = 0 Timer2.Enabled = True Label1.Visible = False Label2.Caption = a(x) Label2.Visible = True Form1.SetFocus Else Close #1 MsgBox "謝謝你的參與!請(qǐng)通知主試收拾數(shù)據(jù)", vbOKOnly, "謝謝" End If End SubPrivate Sub Timer2_Timer() y = y + 1 End SubPrivate Sub Timer3_Timer() Timer3.Enabled = False Label3.Visible = False Label4.Visible = False temp = temp - 1 If temp > 0 Then Label1.Visible = True Timer1.Interval = Int(Rnd * 2500 + 500) Timer1.Enabled = True Else r = 1 z = MsgBox("進(jìn)入第" + Str(f + 1) + "階段?", vbOKCancel, "繼續(xù)") If z = vbOK Then f = f + 1 End If Label1.Visible = True Timer1.Interval = Int(Rnd * 2500 + 500) Timer1.Enabled = True End If End Sub
總結(jié)
以上是生活随笔為你收集整理的vb实现 心理学实验 IAT内隐联想测试的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OCP考试如何确定考试中心
- 下一篇: Chrome手势插件