找回密码
 加入
搜索
查看: 1533|回复: 1

如何使禁用的 EDIT 控件可以输入???

[复制链接]
发表于 2009-11-18 13:03:45 | 显示全部楼层 |阅读模式
本帖最后由 zjg2003 于 2009-11-18 21:08 编辑

现在用的是万象2008标准版,有公安插件,刷卡时身份证号和姓名这两处都不能手动输入,我用以下代码测试没用,请高人帮忙看下哪出的问题:
#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$title = "2008_wanxiang" 
if WinExists($title) Then Exit 
AutoItWinSetTitle($title)  

HotKeySet ("^!{F12}","_ext")   ;退出程序
HotKeySet ("^!{F1}","_edt")   ;开启手动输入

While 1
        Sleep(500)
WEnd

Func _ext()
        Exit
EndFunc

Func _edt()
        ControlCommand ( "扫描或机读身份证", "身份证号", "TEdit2", "IsEnabled", "" )
        ControlCommand ( "扫描或机读身份证", "姓名", "TEdit1", "IsEnabled", "" )
EndFunc
 楼主| 发表于 2009-11-18 13:17:35 | 显示全部楼层
换了下面的代码也是不行,要怎么才能打开那两个控件的可输入状态呢?
        ControlEnable (  "扫描或机读身份证", "身份证号", "TEdit2")
        ControlEnable (  "扫描或机读身份证", "身份证号", "TEdit1")
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-22 17:37 , Processed in 0.077875 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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