Ⅰ 按鍵精靈怎麼循環找兩張圖片點擊,代碼怎麼寫
Do
AX = Plugin.Sys.GetScRX():AY = Plugin.Sys.GetScRY()
FindPic 0, 0, AX, AY, "Attachment:\立刻購買.bmp", 0.9, intX, intY
If intX > 0 And intY > 0 Then
MoveTo intX+5,intY+5
LeftClick 1
Do
FindPic 0, 0, AX, AY, "Attachment:\立即支付.bmp", 0.9, intX1, intY1
If intX1 > 0 And intY1 > 0 Then
MoveTo intX1+5,intY1+5
LeftClick 1
Exit Do
End If
Loop
End If
Loop
復制上面代碼可達成
注意事項:用按鍵精靈抓抓功能抓取相應圖片放到腳本的附件內
Ⅱ 按鍵精靈怎樣做連連看腳本
Dim se(19, 11)
UserVar llk=0 "消除時間"
e = Plugin.Window.Find(0, "QQ游戲 - 連連看角色版")
f = Plugin.window.Foreground()
g = Plugin.Sys.GetScRX()
h = Plugin.Sys.GetScRY()
If e > 0 Then
If f = e Then
i = Plugin.Window.GetWindowRect(e)
j = Split(i, "|")
k = Int(j(0))
l = Int(j(1))
bj="無"
If k >= 0 and l >= 0 and k + 799 <= g and y + 599 <= h Then
rect=GetPixelColor(664+k,96+l)
IfColor k + 64, l + 80, rect, 1 Then
k = k + 28
l = l + 195
m = 0
n = 1
For a = 0 To 18
For b = 0 To 10
se(a, b) = bj
IfColor a * 31 - 12 + k, b * 35 - 13 + l, rect, 0 Then
se(a, b) = GetPixelColor(a * 31 + k, b * 35 + l)
m = m + 1
End If
Next
Next
While m <> 0 and n <> m
n = m
For a = 0 To 18
For b = 0 To 10
If se(a, b) <> bj Then
d=b+1
For c = a To 18
While d <= 10
If se(a, b) = se(c, d) Then
If a = c Then
y1 = b + 1
While se(a, y1) = bj
y1=y1+1
Wend
If y1 = d Then
Call 消除():b=d
Exit For
Else
y2=1
While se(a + y2, b) = bj and se(c + y2, d) = bj
y1 = b + 1
While se(a+y2, y1) = bj
y1=y1+1
Wend
If y1 >= d Then
Call 消除():b=d
Exit For
End If
y2=y2+1
Wend
y2=1
While se(a - y2, b) = bj and se(c - y2, d) = bj
y1 = b + 1
While se(a-y2, y1) = bj
y1=y1+1
Wend
If y1 >= d Then
Call 消除():b=d
Exit For
End If
y2=y2+1
Wend
End If
ElseIf b = d Then
x1 = a + 1
While se(x1, b) = bj
x1=x1+1
Wend
If x1 = c Then
Call 消除()
Exit For
Else
x2=1
While se(a, b + x2) = bj and se(c, d + x2) = bj
x1 = a + 1
While se(x1, b+x2) = bj
x1=x1+1
Wend
If x1 >= c Then
Call 消除()
Exit For
End If
x2=x2+1
Wend
x2=1
While se(a, b - x2) = bj and se(c, d - x2) = bj
x1 = a + 1
While se(x1, b-x2) = bj
x1=x1+1
Wend
If x1 >= c Then
Call 消除()
Exit For
End If
x2=x2+1
Wend
End If
Else
left2=c:down1=b:up1=b
While se(a,down1-1)=bj
down1=down1-1
Wend
While se(a, up1 + 1) = bj
up1=up1+1
Wend
While se(left2 - 1, d) = bj
left2=left2-1
Wend
If down1<=d and up1>=d and left2<=a Then
Call 消除():b=up1
Exit For
End If
right1=a:down2=d:up2=d
While se(right1+1, b) = bj
right1=right1+1
Wend
While se(c, down2 - 1) = bj
down2=down2-1
Wend
While se(c, up2 + 1) = bj
up2=up2+1
Wend
If up2 >= b and down2 <= b and right1 >= c Then
Call 消除():b=up1
Exit For
End If
left1=a:right2=c:bigy=d:smally=b
While se(left1 - 1, b) = bj
left1=left1-1
Wend
While se(right2 + 1, d) = bj
right2=right2+1
Wend
If b > d Then
bigy=b
smally=d
End If
If left1 < left2 Then
leftz=left2
Else
leftz=left1
End If
If right1 < right2 Then
lefty=right1
Else
lefty=right2
End If
w=0
While w<lefty-leftz+1
y1=smally
While se(leftz+w,y1+1)=bj
y1=y1+1
Wend
If y1 >= bigy Then
Call 消除():b=up1
Exit For
End If
w=w+1
Wend
If down1 < down2 Then
leftx=down2
Else
leftx=down1
End If
If up1 < up2 Then
leftw=up1
Else
leftw=up2
End If
w=0
While w<leftw-leftx+1
x1=a
While se(x1+1,leftx+w)=bj
x1=x1+1
Wend
If x1 >= c Then
Call 消除():b=up1
Exit For
End If
w=w+1
Wend
d=up2
End If
End If
d=d+1
Wend
d=0
Next
End If
Next
Next
Wend
LeftUp 1
End If
End If
End If
End If
Sub 消除()
MoveTo a * 31 + k, b * 35 + l
LeftDown 1
Delay llk
MoveTo c * 31 + k, d * 35 + l
LeftDown 1
se(a, b) = bj
se(c, d) = bj
m = m - 2
End Sub
Ⅲ 幫我弄一個按鍵精靈的自動拾取腳本
Dim screenwidth,screenheight
screenwidth=Plugin.Sys.GetScRX
screenheight = Plugin.Sys.GetScRY
Do
FindPic 0,0,screenwidth,screenheight,"Attachment:\你的圖片.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Delay 100
MoveTo intX, intY
Delay 100
LeftClick
Call Plugin.Msg.Tips("""自動拾取完成")
End If
Loop
顏色不靠譜 還是找圖好一些
Ⅳ 按鍵精靈抓一個圖滑鼠點10下然後再抓下一個圖按鍵點10下然後結束怎麼編這個腳本啊。。。在線等
復制以下內容根據實際需要調整延遲時間及循環次數
Rem 標記1
FindPic 251,350,334,580,"Attachment:\hh.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
//下面語句會執行十遍 可根據實際需要自行設定延遲時間1000毫秒=1秒
For 10
LeftClick 1
Delay 1000
Next
//下面雙擊命令未說明用途暫注釋掉 如需要請刪除語句前的//
//LeftDoubleClick 1
Else
//如果沒找到圖片hh.bmp就跳轉到標記1處
Goto 標記1
End if
Rem 標記2
FindPic 251,350,334,580,"Attachment:\hhh.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX, intY
For 10
LeftClick 1
Delay 1000
Next
Else
Goto 標記2
End If
//如果沒有其他循環並且腳本設置執行1次的話,找到圖片hh.bmp點擊十次找到圖片hhh.bmp點擊十次,會執行到這里程序結束。
Ⅳ 求按鍵精靈自動識別圖片的腳本
plugin.simplugocr.reg("")
//精靈里隨便一句命令以注冊com插件
dim s
//聲明變數 s
set aa=CreateObject("simplugocr.ocr")
aa.fontcolor="000000"
s=aa.findstrsByFont("宋體",9,"你想要識別的文字1$你想要識別的文字2$你想要識別的文字3",1,1,1440,900,9)
//("宋體",9,"你圖片的文字類型和大小,1,1,1440,900 是坐標范圍根據自己的修改可以達到更快的速度
msgbox s
//彈出識別到的字,根據自己需要修改
插件下載地址http://bbs.vrbrothers.com/viewthread.php?tid=127985&highlight=
如果不能識別或不會使用最好能吧圖發上來,因為要做字型檔,或者可以到http://bbs.vrbrothers.com官網上去看教程,希望滿意!
Ⅵ 按鍵精靈 語法錯誤:腳本 我的腳本1 ,第28行,第1個字元:(錯誤碼0)缺少符號。怎麼解決啊
Loop改為Next,語法就沒錯誤了,不過你寫程序的習慣不好,程序盡量不要用Goto,程序員的要求,是不能用Goto的,因為濫用Goto,程序結構會變得混亂,一旦代碼有邏輯問題,會非常麻煩,建議你先學習按鍵精靈語言語法。
Ⅶ 按鍵精靈連續找圖點擊求腳本
Rem a1
X = Plugin.Sys.GetScRX()
Y = Plugin.Sys.GetScRY()
Rem a2
FindPic 0,0,X,Y,"Attachment:\多人混戰.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 2, intY + 2
Delay 100
LeftClick 1
Delay 100
MoveTo intX, 0
Delay 100
Else
Goto a2
End If
Rem a3
FindPic 0,0,X,Y,"Attachment:\下一步.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 2, intY + 2
Delay 100
LeftClick 1
Delay 100
MoveTo intX, 0
Delay 100
Else
Goto a3
End If
Rem a4
FindPic 0,0,X,Y,"Attachment:\確定.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 2, intY + 2
Delay 100
LeftClick 1
Delay 100
MoveTo intX, 0
Delay 100
Else
Goto a4
End If
Rem a5
FindPic 0,0,X,Y,"Attachment:\退出.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intX + 2, intY + 2
Delay 100
LeftClick 1
Delay 100
MoveTo intX, 0
Delay 100
Else
Goto a5
End If
Goto a1
自己截圖,然後命名好後,添加到附件里
Ⅷ 按鍵精靈,如何滿足在某個條件後,再進行下一步腳本運行
//圖片"列印.bmp"添加到附件中就可以了,圖片盡量小點.屏幕中是唯一就行了.
圖片目錄
=
"Attachment:\"
X0
=
0
:
Y0
=
0
窗口寬度
=
Plugin.Sys.GetScRX()
:
窗口高度
=
Plugin.Sys.GetScRY()
Delay
500
Do
Delay
1000
FindPic
X0,
Y0,
窗口寬度,
窗口高度,
圖片目錄
&"列印.bmp",
1,
X,
Y
If
X
>
0
And
Y
>
0
Then
MoveTo
x,
y
LeftClick
1
End
If
Loop
Until
x
>
0
or
Y
>
0
Ⅸ 按鍵精靈做得腳本怎麼樣可以在別的電腦上都可以使用 畢竟顯示器都不一樣
你做一個多做幾個常用解析度的版本,如1024*768和1440*900,腳本自己選擇
運行腳本就強制電腦解析度改變成腳本適用解析度。
例如:
ScreenX = Plugin.Sys.GetScRX()
ScreenY = Plugin.Sys.GetScRY()
Dev = Plugin.Sys.GetScDep()
If ScreenX = 1440 and ScreenY = 900 Then
//運行1440*900腳本
ElseIf ScreenX = 1024 and ScreenY = 768Then
//運行1024*768腳本
Else
If abs(ScreenX - 1024) > abs(ScreenX - 1440) Then //如果接近1440,就改變解析度為1440*900
//改為1440*900
Call Plugin.Sys.SetSc(1440,900,32)
Else
//否則改為1024*900
Call Plugin.Sys.SetSc(1024,768,32)
End If
End If
Ⅹ 關於按鍵精靈腳本的類型不匹配問題
Hwnd = Plugin.Window.Find(0,)
sRect = Plugin.Window.GetClientRect(Hwnd)
Dim MyArray
MyArry=Split(Rect, ) // 改為sRect
Ux=CLng(MyArray(0))
Uy=CLng(MyArray(1))
Goto xuanxe
KeyPress `, 1
Delay 1000
IfColor 374+ux,61+uy,11CC,0 Then
KeyPress 1, 1
Else
Rem xuanxe
End If