保險保單資訊站

AutoHotkey、autohotkey語法、autohotkey鍵盤在PTT/mobile01評價與討論,在ptt社群跟網路上大家這樣說

AutoHotkey在[AHK-] AutoHotKey 快速入門教學 - 模擬鍵盤滑鼠動作- 看板EzHotKey

作者[AHK-] AutoHotKey 快速入門教學 - 模擬鍵盤滑鼠動作
標題VElysian (家瑀 致中和)
時間2008-07-19 12:48:51 UTC




模擬鍵盤滑鼠動作:

Sending keystrokes and mouse clicks
http://www.autohotkey.com/docs/Tutorial.htm#Send



模擬鍵盤輸入:


Send 這個指令,可以用來模擬按鍵輸出(keystroke),並且作用於正在使用的視窗。

在下面的範例,我們使用 這個快速鍵打出一些訊息。
(按下快速鍵前,請先確定您正使用文件編輯器或 draft e-mail message 等視窗。)

::
Send Sincerely, {Enter} John Smith
return

在這個例子中,除了 {Enter} 以外,Send 後面的字都會按照順序被打出來。
{Enter} 代表鍵盤上的 Enter。


接下來的範例則使用了其他一些常會用到的文字:

Send {tab} pasted:


上面這一行會先送出 ,
然後是 TAB,
接著是 pasted: ,
最後是 。


在特殊字串和按鍵那邊有關於 Send 指令的完整列表。
(See the Send command for a complete list of special characters and keys.)


關於 特殊字串和按鍵 http://www.autohotkey.com/docs/commands/Send.htm



最後,當你用鍵盤輸入一些英文縮寫時,按鍵輸出(keystroke)也可以作用唷~~
這就是所謂的 快速字串(hotstrings)了。


關於 快速字串 http://www.autohotkey.com/docs/Hotstrings.htm



比方說,
當你打了 Btw 然後按下空格或逗號(,),
然後 AutoHotKey 就會幫你取代成 By the way 囉~~
寫法如下:

::btw::by the way



模擬滑鼠按鍵:


如果要在視窗上模擬滑鼠按鍵,首先必須確定你要在螢幕上哪一點按下滑鼠鍵。
所以第一步是先指定滑鼠按下那一點的 X, Y 座標。

那要如何尋找這個座標呢?
使用 AutoHotKey 內建的 AutoScriptWriter 或 Window Spy 就行了唷~~


下面的範例將會解釋如何利用 Window Spy 來達到:

1. 執行 Windows Spy:
     在右下角快捷列圖示按右鍵選擇 Window Spy。或是按下開始功能表裡的那個。

2. 按一下你喜歡的視窗讓它保持在作用中(active)。
可以按一下它的標題、或是利用 [Alt + TAB] 切換等等。
(請放心,Window Spy 會一直顯示在最上層。)

3. 移動滑鼠至這個視窗上你喜歡的位置,記下 Window Spy 上面顯示的滑鼠座標。
(你也可以用 [Shift + Alt + Tab] 切換到 Window Spy 視窗,
這樣 Window Spy 上面的滑鼠座標值才不會繼續亂跑。 ^_^ )

4. 將記下來的滑鼠座標值直接用 Click 指令執行,
例如像這樣
: Click


關於 Click http://www.autohotkey.com/docs/commands/Click.htm



如果只是要單純移動滑鼠,可以用 MouseMove。

http://www.autohotkey.com/docs/commands/MouseMove.htm


若是要拖曳滑鼠,請愛用 MouseClickDrag。

http://www.autohotkey.com/docs/commands/MouseClickDrag.htm

--

主動是機會的誘餌


--
◆ From: 61.64.172.14

推 imdxball:push 07/19 13:12
推 ymore:推 好文 07/19 13:19
推 L0v35:推一個 07/19 20:00
推 asoedarren:請問autohotkey可以模擬全螢幕下遊戲的操作嗎 例如被 07/20 00:02
→ asoedarren:directInput hook住的遊戲 07/20 00:03
→ VElysian:基本上可以,不過全螢幕解析度可能不太一樣唷~~ 07/20 01:49
→ VElysian:就是說本來設定 1024*768 全螢幕會是 800*600。 07/20 01:49
→ VElysian:你可能要自己試試看囉~~ ^_^ 07/20 01:49
→ VElysian: 全螢幕可能會是 800*600。 07/20 01:51
→ VElysian:剛剛用 pcman 全螢幕,可以用耶 XD 07/20 01:52
→ b2rex:比較想知道有沒有辦法結合winio來控制KEYBOARD/MOUSE 08/05 01:05

AutoHotkey關鍵字相關的推薦文章

AutoHotkey在AutoHotkey的討論與評價

AutoHotkey is a free, open-source scripting language for Windows that allows users to easily create small to complex scripts for all kinds of tasks such as: ...

AutoHotkey在AutoHotkey - 維基百科,自由的百科全書的討論與評價

AutoHotkey 能快速編寫的功能[編輯] · 啟動程式,打開檔案 · 獲得或產生系統狀態,音量(狀態,調節),搜尋螢幕上的圖像或像素(獲得坐標),鼠標(位置,懸停視窗物件, ...

AutoHotkey在輕鬆學會彈指神功-揭露AutoHotkey絕技 - 簡睿隨筆的討論與評價

AutoHotkey 顧名思義就是協助你將常用按鍵自動化的工具,而這些自動化的操作可以由使用者依自身的需求來設置,隨著設定的項目日漸擴充齊全,AutoHotkey ...

AutoHotkey在ptt上的文章推薦目錄

    AutoHotkey在AHK積木 - AHK 語法產生器的討論與評價

    下載Autohotkey 並安裝; 組好拼圖後,點擊下載.ahk檔; 開啟該檔案,選擇使用Autohotkey執行; 螢幕右下角出現綠色圖示 代表腳本已成功運行中 ...

    AutoHotkey在AutoHotkey 1.1.33.09 免安裝版- 取代按鍵精靈的免費自由軟體的討論與評價

    AutoHotkey is a free, open-source utility for Windows. With it, you can: - Automate almost anything by sending keystrokes and mouse clicks. You ...

    AutoHotkey在快速参考| AutoHotkey的討論與評價

    版本1.1.33.10 · https://autohotkey.com | AutoHotkey 文档中文翻译项目 | 英文官网论坛中文板块 · 在线中文帮助. ©2003-2014 Chris Mallett, 部分属于©AutoIt 团队 ...

    AutoHotkey在搜索的討論與評價

    Language. English; Deutsch; 中文. 目录; 索引. AutoHotkey. 指南(快速入门). FAQ(常见问题). 命令和函数索引. 脚本展示. 更新历史. ▻基本用法和语法. 热键.

    AutoHotkey在在指定的程式下使用AutoHotKey 執行快速鍵 - Poy Chang的討論與評價

    有了 .ahk 指令檔,你可以直接執行該檔案來啟動AutoHotKey,或者可以使用安裝目錄中 Compiler 資料夾下的 Ahk2Exe.exe ,將指令檔封裝成一個可執行的 .exe ...

    AutoHotkey在AutoHotKey 自動化工具語法產生器 - Google Sites的討論與評價

    Search this site. AutoHotKey 自動化工具語法產生器 · 首頁 · AHK 積木語法產生器(new) · 更新日誌 · AutoHotKey 自動化工具語法產生器 ...

    AutoHotkey在取得AutoHotkey Store Edition - Microsoft Store zh-TW的討論與評價

    AutoHotkey is a free, open-source custom scripting language for Microsoft Windows, initially aimed at providing easy keyboard shortcuts or ...

    AutoHotkey的PTT 評價、討論一次看



    更多推薦結果