AutoIt GUICtrlRead Specials 字符 [英] AutoIt GUICtrlRead Specials characters
本文介绍了AutoIt GUICtrlRead Specials 字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
autoit GUICtrlCreateInput 特殊字符被忽略?
autoit GUICtrlCreateInput special char ignored ?
$user = GUICtrlCreateInput("", 90, 65, 100, 20)
$dom = GUICtrlCreateInput("", 90, 95, 100, 20)
$pass = GUICtrlCreateInput("", 90, 125, 100, 20, 0x0020)
Send(GUICtrlRead($user) & "{tab}" & GUICtrlRead($dom) & "{tab}" & GUICtrlRead($pass) & "{Enter}")
例如:TOTO"作为用户,home"作为dom,azerty+"作为密码.输出将是:
Example with : "TOTO" as user, "home" as dom and, "azerty+" as password. Output will be :
TOTO home azerty
为什么 GUICtrlRead() 忽略特殊字符作为我的+"字符?
Why GUICtrlRead() ignore specials characters as my "+" char ?
如何解决?
推荐答案
来自帮助文件:
发送()将模拟击键发送到活动窗口.
Send() Sends simulated keystrokes to the active window.
发送( "keys" [, flag] )
Send ( "keys" [, flag] )
参数
- keys - 要发送的密钥序列.
- flag [optional] - 更改键"的处理方式:flag = 0(默认),文本包含特殊字符,如 + 和 !以表示SHIFT 和 ALT 按键.flag = 1,密钥是原始发送的.
- keys - The sequence of keys to send.
- flag [optional] - Changes how "keys" is processed: flag = 0 (default), Text contains special characters like + and ! to indicate SHIFT and ALT key-presses. flag = 1, keys are sent raw.
因此,您的示例缺少设置为 1 的标志.
So, your example is missing flag set to 1.
$user = GUICtrlCreateInput("", 90, 65, 100, 20)
$dom = GUICtrlCreateInput("", 90, 95, 100, 20)
$pass = GUICtrlCreateInput("", 90, 125, 100, 20, 0x0020)
Send(GUICtrlRead($user),1)
Send("{tab}")
Send(GUICtrlRead($dom),1)
Send("{tab}")
Send(GUICtrlRead($pass),1)
Send("{Enter}")
这篇关于AutoIt GUICtrlRead Specials 字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文