按键精灵 如何获取网页上的数字,然后判断数字,使视频的时长为每个动作变量的时间
2个回答
展开全部
利用按键精灵移动鼠标选中文字,按下Ctrl+C组合键,将文字复制到剪切板中,用Plugin.Sys.GetCLB()插件命令获取剪切板的内容,然后用类型转换函数cint或者csng等将内容转化成数值。
MoveTo intX - 50, inty
rightDown 1
Delay 200
MoveTo intX - 20, inty
Delay 500
KeyDown 17, 1
KeyPress 67, 1
KeyUp 17, 1
Delay 500
RightUp 1
//获取学时
studytime = Plugin.Sys.GetCLB()
Delay 500
MoveTo intX - 186, inty
rightDown 1
Delay 200
MoveTo intX - 134, inty
Delay 500
KeyDown 17, 1
KeyPress 67, 1
KeyUp 17, 1
Delay 500
RightUp 1
//已学学时百分比
percent = Plugin.Sys.GetCLB()
percent = Replace(percent,"%","0")
//学时返回值,一课时45分钟,返回单位为分
gostudy = csng(studytime) * (1- csng(percent) / 100) * 45
TracePrint percent
TracePrint gostudy
MoveTo intX - 50, inty
rightDown 1
Delay 200
MoveTo intX - 20, inty
Delay 500
KeyDown 17, 1
KeyPress 67, 1
KeyUp 17, 1
Delay 500
RightUp 1
//获取学时
studytime = Plugin.Sys.GetCLB()
Delay 500
MoveTo intX - 186, inty
rightDown 1
Delay 200
MoveTo intX - 134, inty
Delay 500
KeyDown 17, 1
KeyPress 67, 1
KeyUp 17, 1
Delay 500
RightUp 1
//已学学时百分比
percent = Plugin.Sys.GetCLB()
percent = Replace(percent,"%","0")
//学时返回值,一课时45分钟,返回单位为分
gostudy = csng(studytime) * (1- csng(percent) / 100) * 45
TracePrint percent
TracePrint gostudy
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询