用HotKey热键命令怎么总是说不存在的热键?

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 用HotKey热键命令怎么总是说不存在的热键?

Re: 用HotKey热键命令怎么总是说不存在的热键?

by anuodyang » 31 Dec 2020, 10:32

哦这样的,谢谢!

Re: 用HotKey热键命令怎么总是说不存在的热键?

by anuodyang » 28 Dec 2020, 22:46

fwejifjjwk2 wrote:
28 Dec 2020, 13:36
細節請閱讀文檔 Broken Link for safety

這裡我們創建一個熱鍵 Ctrl + C 只有在 Notepad 中才會生效,這裡將標籤關鍵字設為 MyLabelForNotepad

Code: Select all

Hotkey, IfWinActive, ahk_class Notepad
Hotkey, ^c, MyLabelForNotepad
return
然後我們定義這個標籤會觸發什麼動作

Code: Select all

MyLabelForNotepad:
MsgBox You pressed %A_ThisHotkey%.
return
谢谢!我知道这个。我是想在HotKey命令后面只加热键,不加标签,热键后面的语句只在指定窗口工作。帮助文档里标签是可选项,但是不加标签就总是报错不存在的热键。

用HotKey热键命令怎么总是说不存在的热键?

by anuodyang » 25 Dec 2020, 01:07

用HotKey热键命令怎么总是说不存在的热键?

Code: Select all

Hotkey, IfWinActive, ahk_class 
Hotkey, #c
	msgbox, 在窗口里激活
return

Top