首页 > 代码库 > VBS获得随机数,截图函数

VBS获得随机数,截图函数

‘获取随机数
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

VBS获得随机数,截图函数