VBS获得随机数,截图函数

时间:2023-03-08 16:13:45
'获取随机数
Public function randonum()
  Randomize 
  randonum = replace(10000*rnd(),".","a") & "@qq.com"
End Function
'获取指定范围内的随机数
MAX,MIN
Randomize
WScript.Echo Int((MAX-MIN+1)*Rnd)+MIN
'截图
Public function capture(part)
   Dim filename
   filename = now() & ".png"
   filename = replace(filename,"/","")
   filename = replace(filename,":","")
   filename =  "D:\capture\" & filename
part.capturebitmap filename
End Function