使用情境:
我收到一個excel檔,裡面內嵌很多pdf檔(兩百多個),同事要將這些內嵌檔另外儲存編輯
於是我用按鍵精靈,自動的將Excel內的眾多pdf檔匯出
x = 0
//將匯出的檔案儲存為a-x
b = 50
//b為前一個項目編號,a等於b時:x=x+1
//a不等於b時:x從1開始重新計算
For 300
//自訂循環次數代替腳本循環
MoveTo 43, 218
LeftClick 1
KeyDown 17, 1
KeyPress 67, 1
KeyUp 17, 1
a = Plugin.Sys.GetCLB()
//以上將第一欄數字複製存入a
Delay 200
MoveTo 481, 213
Delay 200
var = GetCursorShape(0)
//移到物件欄,以滑鼠型態為十字箭頭時代表有指到
If var = 1597528207 Then
LeftClick 2
Delay 1000
For 5
IfColor 17, 57, "4F4CEC", 0 Then
//pdf軟體內圖示判斷物件開啟沒
Goto save
Else
Delay 1000
//迴圈等待物件開啟
End If
Next
Rem save
//若開啟則進行存檔
KeyDown 17, 1
KeyDown 16, 1
KeyPress 83, 1
KeyUp 16, 1
KeyUp 17, 1
Delay 1000
For 5
IfColor 17, 57, "4F4CEC", 0 Then
//存檔對話框若開啟會擋住pdf軟體內圖示
Delay 1000
Else
Goto save2
End If
Next
Rem save2
If a = b Then
//b為前一個項目編號,a等於b時,代表還在同一項:x=x+1
x=x+1
SayString a
SayString "-"
SayString x
KeyPress "Enter", 1
Else
//a不等於b時:開始新項目,x從1開始重新計算
x=1
SayString a
SayString "-"
SayString x
KeyPress "Enter", 1
End If
Delay 1000
//關閉pdf軟體
KeyDown 18, 1
KeyPress 115, 1
KeyUp 18, 1
End If
Delay 1000
//複製剛做完這項的編號存入b
MoveTo 43, 218
LeftClick 1
KeyDown 17, 1
KeyPress 67, 1
KeyUp 17, 1
b = Plugin.Sys.GetCLB()
//移動到下一小項
Delay 200
MoveTo 692, 665
LeftClick 1
KeyPress "Down", 1
Delay 1000
Next
畫面狀態如下
請問有待寫按鍵精靈腳本嗎?
回覆刪除該如何聯絡您呢?
qmouso2u辜狗信箱
刪除