
按键精灵if语句
key=WaitKey()Ifkey=112ThenKeyPress"Num1",1KeyPress"E",1KeyPress"R",1EndIfIfkey=113The...
key = WaitKey()
If key = 112 Then
KeyPress "Num 1", 1
KeyPress "E", 1
KeyPress "R", 1
End If
If key = 113 Then
KeyPress "Num 2", 1
KeyPress 115, 1
KeyPress "3"
KeyPress "4", 1
KeyPress "3", 1
End If
If key = 114 Then
KeyPress "Num 2", 1
KeyPress 115, 1
KeyPress "3"
KeyPress "4", 1
KeyPress "3", 1
End If
If key = "`" Then
KeyPress "Num 5", 1
KeyPress "1", 1
End If
我设置的当按f1则1er f2则2f4343 f3则2f4343
但是运行提示脚本错误 哪里错了是不是还要加什么
求解谢谢拉 展开
If key = 112 Then
KeyPress "Num 1", 1
KeyPress "E", 1
KeyPress "R", 1
End If
If key = 113 Then
KeyPress "Num 2", 1
KeyPress 115, 1
KeyPress "3"
KeyPress "4", 1
KeyPress "3", 1
End If
If key = 114 Then
KeyPress "Num 2", 1
KeyPress 115, 1
KeyPress "3"
KeyPress "4", 1
KeyPress "3", 1
End If
If key = "`" Then
KeyPress "Num 5", 1
KeyPress "1", 1
End If
我设置的当按f1则1er f2则2f4343 f3则2f4343
但是运行提示脚本错误 哪里错了是不是还要加什么
求解谢谢拉 展开
3个回答
展开全部
按键的反应时间啊。中间要加延迟。要不然会出错。或者看不到你要的效果
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
If key = 114 Then
KeyPress "Num 2", 1
KeyPress 115, 1
KeyPress "3" //这一行错了
KeyPress "4", 1
KeyPress "3", 1
End If
KeyPress "Num 2", 1
KeyPress 115, 1
KeyPress "3" //这一行错了
KeyPress "4", 1
KeyPress "3", 1
End If
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这个格式很蛋疼,并且我没看懂。所以我还是新手吧。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |