《按键精灵脚本自动出口算题练习》由会员分享,可在线阅读,更多相关《按键精灵脚本自动出口算题练习(11页珍藏版)》请在金锄头文库上搜索。
1、按键精灵脚本自动出口算题练习按键精灵脚本自动出口算题练习dim a,ba=InputBox(“输入加减法上限“)b = InputBox(“输入出题个数“)q=InputBox(“是 2 个数还是 3 个数相加减“)a=cint(a)b = cint(b)q = cint(q)Delay 500If q = 2 Then Call 子程序 1()End IfCall 子程序 2()Sub 子程序 1()Rem 开始Randomizex=int(Rnd * (a-1+1) + 1y=int(Rnd * (a-1+1) + 1f=int(Rnd * (1-0+1) + 1If f=1 Thenm=
2、“-“If x-ya ThenGoto 开始End ifGoto 打印 2End ifRem 打印 1L=L+1C = C + 1Rem 重新 1ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)shi=jia1+m+jia2+“=“t = InputBox(shi, ge1, “)t = cint(t)If x - y = t Then dui = dui + 1Else MessageBox “错误,请重新回答.“ Goto 重新 1End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努
3、力哦.“EndScriptEnd ifGoto 开始Rem 打印 2L=L+1C = C + 1Rem 重新 2ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)shi=jia1+m+jia2+“=“t = InputBox(shi, ge1, “)t = cint(t)If x + y = t Then dui = dui + 1Else MessageBox “错误,请重新回答.“Goto 重新 2End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd i
4、fGoto 开始End SubSub 子程序 2()Rem 开始Randomizex=int(Rnd * (a-1+1) + 1y=int(Rnd * (a-1+1) + 1f=int(Rnd * (1-0+1) + 1z=int(Rnd * (a-1+1) + 1g=int(Rnd * (1-0+1) + 1If f=1 ThenIf x-ya ThenGoto 开始End ifGoto 打印 2End ifEnd IfIf f=2 Thenm=“+“End ifIf x+ya ThenGoto 开始End ifIf g=1 Theng=“-“If x+y-za ThenGoto 开始End
5、 ifGoto 打印 4End ifRem 打印 1L=L+1C = C + 1Rem 重新 1ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)jia3 = cstr(z)shi=jia1+m+jia2+g+jia3+“=“t = InputBox(shi, ge1, “)t = cint(t)If x - y -z= t Then dui = dui + 1Else MessageBox “错误,请重新回答.“ Goto 重新 1End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努力哦
6、.“EndScriptEnd ifGoto 开始Rem 打印 2L=L+1C = C + 1Rem 重新 2ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)jia3 = cstr(z)shi=jia1+m+jia2+g+jia3+“=“t = InputBox(shi, ge1, “)t = cint(t)If x - y +z= t Then dui = dui + 1Else MessageBox “错误,请重新回答.“ Goto 重新 2End IfDelay 50If c = b Then MessageBox “本次答题结束
7、,继续努力哦.“EndScriptEnd ifGoto 开始Delay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始Rem 打印 3L=L+1C = C + 1Rem 重新 3ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)jia3 = cstr(z)shi=jia1+m+jia2+g+jia3+“=“t = InputBox(shi, ge1, “)t = cint(t)If x + y -z= t Then dui = dui + 1Else Me
8、ssageBox “错误,请重新回答.“ Goto 重新 3End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始本脚本为电脑自动出口算题的脚本。把以下文本复制到按键精灵的源文件里,就可以运行了,口算运算上限自定,出题个数自定,加数减数的个数自定。 。 。Delay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始Rem 打印 4L=L+1C = C + 1Rem 重新 4ge = cstr(c)ge1=“第“+ge+
9、“题“jia1 = cstr(x)jia2 = cstr(y)jia3 = cstr(z)shi=jia1+m+jia2+g+jia3+“=“t = InputBox(shi, ge1, “)t = cint(t)If x + y +z= t Then dui = dui + 1Else MessageBox “错误,请重新回答.“ Goto 重新 4End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始Delay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始End Sub