VBS: escribe un revoltijo de artículos

Dim ws 
Set ws = WScript.CreateObject ("WScript.Shell") 

arrDict = array ("A", "B", "C", "D", "E", "F", "G", "H" , "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", " U "," V "," W "," X "," Y "," Z ") 

Función Aleatoria (m, n) 
	Aleatorizar 
	Aleatoria = Int (((n-m + 1) * Rnd) + m) 
Fin Función 

outLen = 1000 
idxMin = lbound (arrDict) 
idxMax = ubound (arrDict) 

do 
	ws.Run "% windir% \ notepad.exe" 
	ws.AppActivate "无 标题 - 记事 本" 
	nowTime = year (Now) & Month (Now) &day (Now) & "-" & Hour (Now) & Minute (Now) & Second (Now) 
	WScript.Sleep 1500 

	ws.sendKeys nowTime & "\ r \ n" 
	For i = 1 To outLen 
		idxRdm = Random (idxMin, idxMax) 
		ws .sendkeys "" & arrDict (idxRdm) y ""
		'ws.SendKeys "^ {v}" 
	siguiente

	'Ctrl + S 
	ws.SendKeys "^ {s}" 
	WScript.Sleep 200 
	ws.AppActivate "另存 为" 
	ws.SendKeys nowTime 
	WScript.Sleep 300 
	ws.SendKeys "% s" 

	WScript.Sleep 500 
	ws.sendKeys "% {F4 } " 
'ws.SendKeys" {enter} " 
	WScript.Sleep 5000 
Loop

 

Supongo que te gusta

Origin www.cnblogs.com/xinyueliu/p/12693158.html
Recomendado
Clasificación