[AHK-] [分享] 抓滑鼠座標背景執行

看板EzHotKey作者 (米沙)時間14年前 (2011/05/28 14:11), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
呼~謝謝版上前輩的回答,寫出一個紀錄座標 然後自動去點的程式 ArrayCount = 0 RunCount = 0 #Z:: InputBox, RunCount , 輸入重複次數 , 輸入需要重複的次數 if ErrorLevel { RunCount = 10 } ArrayCount = 0 Return #C:: MouseGetPos, xpos, ypos , id, control ArrayCount += 1 ArrayX%ArrayCount% = %xpos% ArrayY%ArrayCount% = %ypos% Return #X:: WinGet, active_id, ID, A Return #V:: Loop %RunCount% { Loop %ArrayCount% { elementX := ArrayX%A_Index% elementY := ArrayY%A_Index% TMPX = % ArrayX%A_Index% TMPY = % ArrayY%A_Index% ControlClick, x%TMPX% y%TMPY% , ahk_id %active_id% , , , , NA Sleep, 3000 } Sleep, 300000 } Return #Q:: Exit Return 腳本大意如下 WIN+X 抓取目前視窗 WIN+Z 歸零 與 重新設定迴圈次數 WIN+C 擷取目前滑鼠座標 WIN+V 開始執行 每按一次停留三秒 五分鐘重複一次 WIN+Q 結束 要重開最好是按 關閉 在執行 拉 五分鐘是剛好我那遊戲的時間,依需求調整 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 112.104.133.246
文章代碼(AID): #1Du97tLM (EzHotKey)
文章代碼(AID): #1Du97tLM (EzHotKey)