开发者

How to redefine system-wide shortcuts in AutoIt? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Closed 4 years ago.

  • Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
  • This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve th开发者_开发百科is question

On Windows, when you press Win+f, the Windows Search utility will pop up. I want to redefine this short cut and point to another program (yes, it's also a search utility, everything). I tried the following code but it doesn't work.

; open everything.exe
HotKeySet("#f", "open_everything")

; # win
; ^ ctrl
; + shift
; ! alt

While 1
    Sleep(200)
WEnd

; open everything
Func open_everything()
    MsgBox(4, "", "everything ... ")
EndFunc

When I change the short cut to Win+z, everything works.

; open everything.exe
HotKeySet("#z", "open_everything")

; # win
; ^ ctrl
; + shift
; ! alt

While 1
    Sleep(200)
WEnd

; open everything
Func open_everything()
    MsgBox(4, "", "everything ... ")
EndFunc

Any ideas of this problem? Thanks


From the AutoIt help file. Page is Function Reference -> HotKeySet. The following hotkeys cannot be set: Win+B,D,E,F,L,M,R,U; and Win+Shift+M

These are built-in Windows shortcuts. Note: Win+B and Win+L might only be reserved on Windows XP and above.

Much easier is to for example bind the key on Ctrl+F and get used to pressing that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜