找回密码
 加入
搜索
查看: 1879|回复: 3

[系统综合] 后台键盘无法写入 能帮我解决下吗

[复制链接]
发表于 2013-2-22 04:58:39 | 显示全部楼层 |阅读模式
#include <WinAPI.au3>
Run("Notepad.exe")
Global $title = '无标题 - 记事本'
Global $HWnd = WinGetHandle($title)
If $HWnd = 0 Then Exit
Sleep(1000)
_WinAPI_PostMessage($HWnd, 0x0100, 43, 0);点击C
Sleep(1000)
WinActivate($title)
Exit
发表于 2013-2-22 10:11:24 | 显示全部楼层
#include <WinAPI.au3>
Run("Notepad.exe")
WinWait('无标题 - 记事本')
Global $title = '无标题 - 记事本'
Global $HWnd = WinGetHandle($title)
$hEdit = ControlGetHandle($HWnd, '', 'Edit1')
If $HWnd = 0 Then Exit
Sleep(1000)
_WinAPI_PostMessage($hEdit, 258, Asc("C"), 0);点击C
Sleep(1000)
WinActivate($title)
Exit
发表于 2013-2-22 10:19:12 | 显示全部楼层
Run("Notepad.exe")
后面
加个WinWait("无标题 - 记事本")
发表于 2013-3-23 14:37:20 | 显示全部楼层
输入c  还是点击c啊
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-19 18:09 , Processed in 0.085852 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表