徐有道。
2021-01-23 22:59如何提取时间格式 时:分:秒 中的分字符串?显示类型不匹配?
本人程序白板子,到处复制粘贴搞了这么一串码,想着拼接到一起,结果整不会了,哪位好心的哥哥帮我看看、谢谢您们了!
dim Obj,UserName,LenS,Num,h,m,s
h=Hour(time)
m = Minute(time)
s = Second(time)
Set Obj = createobject("WScript.Shell")
UserName = Obj.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOwner")
YN=Obj.Popup(UserName&"00",36)
If YN = 6 Then
Rem InputTime
SWTime=InputBox ("22:35:25")
LenS=Len(SWTime)
Num=Instr(SWTime,":")
If Num=0 Then
Num=Instr(SWTime,"£º")
End If
If Num=0 Then
Call Obj.Popup("00",48)
Goto InputTime
End If
If left(SWTime,Num-1)>23 or left(SWTime,Num-1)<0 Then
Call Obj.Popup("00",48)
Goto InputTime
End If
If Mid(SWTime,LenS-Num)>59 or Mid(SWTime,LenS-Num)<0 Then
Call Obj.Popup("00",48)
Goto InputTime
End If
If Right(SWTime,LenS-Num)>59 or Right(SWTime,LenS-Num)<0 Then
Call Obj.Popup("ÃëÖÓ¸ñʽÊäÈë´íÎó£¡",5,"ʱ¼ä¸ñʽ´íÎó£¡",48)
Goto InputTime
End If
Call Obj.Popup("00", 48)
For 30
Rem [wait]
UserVar HH=0 "时"
UserVar MM=0 "分"
UserVar SS=0 "秒"
UserVar inter=6500 "第二次提交间隔"
If h = Hour(SWTime) and m = Minute(SWTime) and s= Second(SWTime)
MoveTo 1761, 1059
Delay 3000
LeftClick 1
Delay 3000
FindPic 1719,633,1791,1008,"图片",0.7,intX,intY
If intX > 0 And intY > 0 Then
Delay 2000
MoveTo intX+10, intY+7
End If
Delay 3000
LeftDown 1
Delay 1000
MoveTo 1752, 767
Delay 1000
LeftUp 1
Delay 3000
KeyPress "Esc", 1
Else
Delay 200
Goto [wait]
End If
Next
End If
- 点赞
- 回答
- 收藏
- 复制链接分享
0条回答
为你推荐
- python如何提取多级字典中的键值对?
- python
- 数据挖掘
- 1个回答
- go为什么不能获取字符串某个字符地址?
- Golang
- 2个回答
- 请大佬指点下:c语言长整数转化成16进制字符串,可字符串不显示?
- c语言
- 2个回答
- 正则表达式不包含特定字符串?
- 正则表达式
- 2个回答
- C#string数组转int数组异常显示输入字符串不正确?
- c#
- 3个回答