我想对一个网站进行猴子测试(随机单击并将一些值发送到屏幕)。我在 Word 文档上尝试了脚本,但发送的唯一字符是$
. 如何解决这个问题?
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.8.1
Author: Vasile
Script Function:
Monkey.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
Run("C:\Program Files\Google\Chrome\Application\chrome.exe http://quiz.interhit.net/");deschide chrome--si site QUIZ
Sleep(200)
$activ_x = 676
$activ_y = 569
$repetari = 0
Do
Local $array[27]
$array[0]="F5"
$array[1]="F1"
$array[3]="F12"
$array[4]="¬"
$array[5]="1"
$array[6]="10"
$array[7]="-"
$array[8]="="
$array[9]="+"
$array[10]="TAB"
$array[11]="SPACE"
$array[12]="LWIN"; WINDOWS KWY
$array[13]="CAPSLOCK"
$array[14]="LALT";ALT KEY
$array[15]="Enter"
$array[16]="ESC"
$array[17]="DELETE"
$array[18]="BACKSPACE"
$array[19]="SCROLLLOCK"
$array[20]="LSHIFT"
$array[21]="A"
$array[22]="Z"
$array[23]="a"
$array[24]="z"
$array[25]="1"
$array[26]="10"
$x = Random(10, 900, 1)
$y = Random(10, 600, 1)
$chr = Random(0,27,1)
Local $i = 0
While $i<= 3
MouseClick("left", $y, $x)
Send("$array[$chr]}")
$i = $i + 1
WEnd
$repetari= $repetari + 1
Until $repetari = 10