小弟是按鍵新手 在參考官網的教學之後 嘗試寫一個抓字的腳本
但是判斷和循環 實在搞不懂... 請高手指教
例如以下
rem start
FindPic 0,0,1024,768,"Attachment:\1.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX+20, intY+5
Delay 1000
LeftClick 1
End If
Delay 1000
FindPic 0,0,1024,768,"Attachment:\2.bmp",1,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX+10, intY+5
Delay 1000
LeftClick 1
End If
Delay 1000
Rem A
FindPic 0,0,1024,768,"Attachment:\3.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX+20, intY+10
Delay 1000
LeftClick 1
End If
Delay 1000
Rem B
FindPic 0,0,1024,768,"Attachment:\4.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX+30, intY
Delay 1000
LeftClick 1
End If
Delay 1000
Rem C
FindPic 0,0,1024,768,"Attachment:\5.bmp",1,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX+20, intY
Delay 1000
LeftClick 1
End If
Delay 1000
Rem D
FindPic 0,0,1024,768,"Attachment:\6.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX+10, intY+5
Delay 2000
LeftClick 1
End If
i=i+1
while i>30
goto start
請問
標記D的數字可能會連續出現5次
所以如何判斷畫面上數字出現就點擊一次
標記D如果成立就跳出循環
標記D如果不成立就重新依序檢查 標記A.B.C.D
Recommended article: Chomsky: We Are All – Fill in the Blank.
This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.