Autohotkey错误按键发送到控制台 [英] Autohotkey wrong keystrokes sent to console

查看:873
本文介绍了Autohotkey错误按键发送到控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



使用此脚本:

  #NoEnv 
#SingleInstance force
SendMode输入
; Alt + t发送击键
!t :: Send,/ [

它发送正确的击键/ []到所有窗口,但Windows控制台>

其他信息:




  • 使用autohotkey v1.1.09.02

  • 使用英语美式键盘布局,它发送:'90

  • 使用法语加拿大多语言键盘布局,它发送:é^ç



有什么可以解决的想法?

解决方案

  #NoEnv 
#SingleInstance force
; SendMode输入
; Alt + t发送键击
!t :: Send,%chr(047)chr(091)chr(093)
返回

$ b



找到这个:

我使用多种语言或键盘布局在我的系统上。为什么发送和Hotstrings有时发送错误的字符?
每当脚本的语言或键盘布局与活动窗口的布局不匹配时,就会发生这种情况。要解决它,打开脚本的主窗口通过其托盘图标。当主窗口处于活动状态时,使用语言栏(或诸如LeftAlt + Shift之类的语言热键)来更改脚本的语言/布局,以匹配当前正在输入的窗口。切换脚本语言可以使用以下示例热键:

  #l ::; Win + L热键。 
ListLines;显示脚本的主窗口。
WinWaitActive ahk_class AutoHotkey
发送{LAlt down} {Shift} {LAlt up};切换到替代语言(键必须采用此格式)。
WinMinimize;最小化WinWaitActive上面找到的窗口。
return

更多信息:与所有应用程序一样,每个脚本都使用默认语言启动。如果默认值与活动窗口(发送按键的位置)不匹配,则键盘布局的差异可能会导致脚本发送的按键被翻译为意外情况。



开: http://autohotkey.free.fr/docs/FAQ.htm#加载


I am trying to understand this bug and I am looking for a workaroud.

Using this script:

#NoEnv
#SingleInstance force
SendMode Input
;Alt+t to send keystrokes
!t::Send, /[]

It send the correct keystrokes /[] to all windows but the windows console (cmd)

Additional Info:

  • Using autohotkey v1.1.09.02
  • With an english US keyboard layout, it sends: '90
  • With a french canadian multilingual keyboard layout, it sends: é^ç

Any idea of what can fix it?

解决方案

Try this:

#NoEnv
#SingleInstance force
;SendMode Input
;Alt+t to send keystrokes
!t::Send, % chr(047) chr(091) chr(093)
Return

And let me know if it solves your issues.

Found this:
I use multiple languages or keyboard layouts on my system. Why do Send and Hotstrings sometimes send the wrong characters? This can happen whenever the script's language or keyboard layout does not match that of the active window. To fix it, open the script's main window via its tray icon. While the main window is active, use the language bar (or a language hotkey such as LeftAlt+Shift) to change the script's language/layout to match that of the window you are currently typing in. Switching the script's language can be automated with the following example hotkey:

#l::   ; Win+L hotkey.
ListLines  ; Show the script's main window.
WinWaitActive ahk_class AutoHotkey
Send {LAlt down}{Shift}{LAlt up}  ; Switch to alternate language (keys must be in this format).
WinMinimize  ; Minimize the window found by WinWaitActive above.
return

More info: Like all applications, each script starts off using your default language. If the default does not match that of the active window (where the keystrokes are sent), the difference in keyboard layouts might cause keystrokes sent by the script to be translated into something unexpected.

On: http://autohotkey.free.fr/docs/FAQ.htm#load

这篇关于Autohotkey错误按键发送到控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆