- UID
- 250226
- 帖子
- 499
- 主題
- 499
- 精華
- 0
- 積分
- 503
- 楓幣
- 5011
- 威望
- 502
- 存款
- 0
- 贊助金額
- 0
- 推廣
- 0
- GP
- 524
- 閱讀權限
- 50
- 性別
- 保密
- 在線時間
- 14 小時
- 註冊時間
- 2018-10-19
- 最後登入
- 2018-11-23
|
這是自己用"按鍵精靈"寫的腳本,我是初新手而已,沒有去特別學,專業人士可以當作看看戲就好
我只有兩個帳號,所以只寫兩個視窗互相切換而已,而且不能後台動作,因為我不會用後台抓圖,如果有興趣的可以詢問我,有空我就回答,腳本COPY去不用錢,但是要看得懂阿!!不是直接用就行的
1.模擬器解析度800*600
2.在桌面建資料夾(按鍵精靈圖新增資料夾 (2))照順序建每一個斜線代表在前一個資料夾裡面再建
3.截圖到新資料夾(2)以下紅色圈圈的圖片
https://www.youtube.com/watch?v=tKRiWGGzV-8
腳本:
"Delay 3000
"1.取得視窗2.移動到最左上3.取得視窗大小4.把大小坐標化
Hwnd = Plugin.Window.Foreground()
Call Plugin.Window.Move(Hwnd, 0, 0)
sRect = Plugin.Window.GetWindowRect(Hwnd)
dim MyArray
MyArray = Split(sRect, "|")
L = Clng(MyArray(0)): T = Clng(MyArray(1))
R = Clng(MyArray(2)): B = Clng(MyArray(3))
"初始點xx,yy
ax=509
by=283
"time1=往右下/time2=往左下
time1=7
time2 = 6
Rem ALL
Delay 500
MoveTo ax, by
GetCursorPos x1, y1
Delay 500
LeftClick 1
Delay 500
Call start()
Delay 100
Goto ALL
Sub Q1()
Delay 500
LeftDown 1
Delay 500
MoveTo ax, by
Delay 50
GetCursorPos x1, y1
Delay 500
Call A1()
Delay 50
LeftUp 1
Delay 500
End Sub
Sub A1()
Call A2()
For time1
Delay 50
MoveTo x1+17, y1+8
Delay 50
GetCursorPos x1, y1
Delay 50
Call A2()
Next
End Sub
Sub A2()
For time2
Delay 50
MoveR -17, 8
Delay 50
Next
Call check()
End Sub
Sub A3()
Delay 500
KeyPress "Z", 1
Delay 500
Call Z4()
Delay 500
KeyPress "X", 1
Delay 500
Call Z4()
Delay 500
KeyPress "C", 1
Delay 500
Call Z4()
Delay 500
End Sub
Sub start()
Delay 500
Rem S1
FindPic L,T,R,B,"C:UsersUSERDesktop按鍵精靈圖新增資料夾 (2)種小麥.bmp",0.8,intX,intY
If intX> 0 And intY> 0 Then
Delay 100
MoveTo intX+5, intY+5
Delay 100
Call S1()
Delay 100
End If
FindPic L,T,R,B,"C:UsersUSERDesktop按鍵精靈圖新增資料夾 (2)收成.bmp",0.8,intX,intY
If intX> 0 And intY> 0 Then
Delay 100
MoveTo intX+5, intY+5
Delay 100
Call S2()
Delay 100
End If
Delay 1000
LeftClick 1
Goto S1
End Sub
Sub check()
Delay 100
FindPic L,T,R,B,"C:UsersUSERDesktop按鍵精靈圖新增資料夾 (2)叉叉.bmp",0.8,intX,intY
If intX> 0 And intY> 0 Then
Delay 100
LeftUp 1
Delay 100
MoveTo intX+5, intY+5
Delay 500
LeftClick 1
Delay 500
KeyPress "Z", 1
Delay 500
Call Z4()
Delay 500
KeyPress "X", 1
Delay 500
Call Z4()
Delay 500
KeyPress "C", 1
Delay 500
Call Z4()
Delay 500
Goto ALL
End If
End Sub
Sub exchange()
KeyDown "Alt", 1
Delay 50
KeyDown "Tab", 1
Delay 50
KeyUp "Tab", 1
Delay 50
KeyUp "Alt", 1
Delay 100
End Sub
Sub Z4()
Delay 1000
FindPic L,T,R,B,"C:UsersUSERDesktop按鍵精靈圖新增資料夾 (2)小麥確認.bmp",0.8,intX,intY
If intX> 0 And intY> 0 Then
Delay 100
FindPic L,T,R,B,"C:UsersUSERDesktop按鍵精靈圖新增資料夾 (2)沒問題.bmp",0.8,intX,intY
If intX> 0 And intY> 0 Then
Delay 100
MoveTo intX, intY
Delay 100
LeftClick 1
Delay 100
Goto ALL
End If
else
Delay 100
FindPic L,T,R,B,"C:UsersUSERDesktop按鍵精靈圖新增資料夾 (2)現在不想賣.bmp",0.8,intX,intY
If intX> 0 And intY> 0 Then
Delay 100
MoveTo intX, intY
Delay 100
LeftClick 1
Delay 100
End If
End If
End Sub
Sub S1()
Delay 200
Call Q1()
Delay 200
Call exchange()
Delay 200
Goto ALL
Delay 200
End Sub
Sub S2()
Delay 200
Call Q1()
Delay 200
Call A3()
Delay 200
Goto ALL
Delay 200
End Sub
|
|