精華區beta sttmountain 關於我們 聯絡資訊
今天去草嶺古道洗三溫暖, 路上跟朋友聊到國家公園申請入園的問題 不外乎是剪貼的方式也已經用了, 但始終都玩不過某些團體... 於是回到家後, 就寫了這一篇... 記得在雪霸的網站有這麼一段話: "網路申辦的好處:讓您節省申辦時間,在熱門時間與熱門路線,讓您更快更容易 申請到床位,並且方便您追蹤案件查詢。" 笨蛋!! 問題不在 "名冊" 打的快慢! 如何將電腦及網路好處發揮到淋漓盡致才是重點... 現在就來推薦一款短小而精悍的軟体... AutoIt3 - [下載] http://www.autoitscript.com/autoit3/downloads.shtml 這一款有許多自動化功能, 其中自動鍵盤輸入是我們目前需要的, 更多功能討論 可以去 EzHotKey 這個板找相關的文章, 現在請下載完這套軟體並執行安裝... 這裡先簡單舉個範例, 如何在雪霸入園申請名冊做自動輸入的方式! 首先你先到 http://ppt.cc/XTS2 這個網址抓一個我剛寫的範例檔, 將壓縮檔下載後解壓, 會出現兩個檔, 兩檔的內容分別如下: ===== [ infrm.txt 人員名冊資料檔 ] ===== 陳小樹 A123456789 女 地球台灣高雄 陳老媽 0212345678 陳大樹 F123456789 男 地球台灣台北 陳老爹 0223456789 ======================================== ===== [ infrm.au3 程式檔 ] ============= $wid=WinActivate("雪霸國家公園入園申請","") $file=fileopen("infrm.txt",0) if $file = -1 then msgbox(0, "Error", "Unable to open file.") exit endif while 1 $line=filereadline($file) if @error = -1 then exitloop sleep(500) send("^a^x" & $line & "{TAB}{TAB}") $line=filereadline($file) sleep(500) send("^a^xa{TAB}" & $line & "{TAB}{SPACE}") $line=filereadline($file) sleep(500) if stringcompare($line,"女") then send("{DOWN}") send("{TAB}") $line=filereadline($file) sleep(500) send("^a^x" & $line & "{TAB}") $line=filereadline($file) sleep(500) send("^a^x" & $line & "{TAB}{TAB}") $line=filereadline($file) sleep(500) send("^a^x" & $line & "{TAB}}") wend fileclose($file) ======================================== 1) 接下來用瀏覽器開啟雪霸申請入園的網頁 ( https://apply.spnp.gov.tw/ ) 按以往申請的步驟到如下的畫面: http://album.blog.yam.com/show.php?a=amjads&f=8073800&i=16534419&p=0 (上圖 本隊人數為 2 人, 並將鍵盤游標點放到 領隊-姓名 這一欄) 2) 將視窗切到檔案總管中, 用滑鼠雙點擊 infrm.au3 該檔, 程式執行後會切回到 雪霸申請入園的網頁, 並將 infrm.txt 中的人員名冊自動填入網頁中的欄位: http://album.blog.yam.com/show.php?a=amjads&f=8073800&i=16534427&p=1 (上圖除生日及稱謂須手動點選外, 其餘皆已自動填入) 3) 如何將更多的選項達到自動化, 請參考 C:\Program File\AutoIt3\AutoIt3.chm 該說明檔中的 Mouse Management 及 Graphic and Sound Management 的 pixelgetcolor 相關 function ... 另外到 http://www.autoitscript.com/autoit3/docs/ 也有更多 .chm 當中未 提及的功能... -- ( 7:00am 某人的嘴角再度揚起) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.112.175.114
h94:某人的嘴角再度揚起...... 11/07 23:07
peregrinus:就是這個光 11/07 23:42