关于(读取Input文字写入Edit1
GUI文字框中可以保存单独删除或替换)请各位帮帮忙 - 『 提问交流 』 -
AUTOIT CN AutoIt中文论坛|acn|au3|软件汉化 - 分享您的技术!
帖子497&精华0&积分371&威望80 点&金钱972 块&贡献-38 分&阅读权限30&在线时间51 小时&注册时间&最后登录&
关于(读取Input文字写入Edit1
GUI文字框中可以保存单独删除或替换)请各位帮帮忙
悬赏金额: 30 块金钱
关于(读取Input文字写入Edit1&&GUI文字框中,可以保存单独删除或替换)请各位帮帮忙哦!!谢了!!!!~
#include &ButtonConstants.au3&
#include &EditConstants.au3&
#include &GUIConstantsEx.au3&
#include &StaticConstants.au3&
#include &WindowsConstants.au3&
#include &GuiEdit.au3&
Global $Label1, $Label2, $Label3, $Label4
Global $caput_text = False, $Title, $Name0, $Name1, $Name2
Opt(&GUIOnEventMode&, 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate(&信息备份&, 901, 701, (@DesktopWidth - 258) / 2, @DesktopHeight - 118)
GUISetOnEvent($GUI_EVENT_CLOSE, &Form1Close&)
$Edit1 = GUICtrlCreateEdit(&&, 10, 17, 530, 320, BitOR($ES_AUTOVSCROLL, $WS_HSCROLL, $WS_VSCROLL), _
& && && && && & BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE))
GUICtrlSetData(-1, &&)
GUICtrlSetOnEvent(-1, &Edit1Change&)
$Input1 = GUICtrlCreateInput(&姓 名&, 8, 368, 170, 21)
$Input2 = GUICtrlCreateInput(&联系方式&, 192, 368, 185, 21)
$Label1 = GUICtrlCreateLabel(&备份总表&, 13, 2, 518, 15, $SS_CENTER)
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlCreateLabel(&邮编:&, 392, 372, 31, 17)
GUICtrlCreateLabel(&邮编:&, 392, 406, 31, 17)
$Input3 = GUICtrlCreateInput(&555555&, 424, 368, 50, 21)
$Input4 = GUICtrlCreateInput(&666666&, 424, 402, 50, 21)
;**** 新+文本框 ****姓 名
$Input5 = GUICtrlCreateInput(&姓 名&, 8, 400, 170, 21)
$Input6 = GUICtrlCreateInput(&联系方式&, 192, 401, 185, 21)
$Input7 = GUICtrlCreateInput(&姓 名&, 8, 430, 170, 21)
$Input8 = GUICtrlCreateInput(&联系方式&, 192, 434, 185, 21)
$Input9 = GUICtrlCreateInput(&姓 名&, 8, 464, 170, 21)
$Input10 = GUICtrlCreateInput(&联系方式&, 192, 466, 185, 21)
$Input11 = GUICtrlCreateInput(&姓 名&, 8, 496, 170, 21)
$Input12 = GUICtrlCreateInput(&联系方式&, 192, 497, 185, 21)
$Input13 = GUICtrlCreateInput(&姓 名&, 8, 527, 170, 21)
$Input14 = GUICtrlCreateInput(&联系方式&, 192, 529, 185, 21)
;**** 新+文本框 ****
$Button1 = GUICtrlCreateButton(&保 存&, 488, 371, 50, 20)
GUICtrlSetOnEvent(-1, &Button1Click&)
$Button2 = GUICtrlCreateButton(&清 除&, 488, 400, 50, 20)
GUICtrlSetOnEvent(-1, &Button2Click&)
;**** 新+按钮 ****
$Button3 = GUICtrlCreateButton(&写 入&, 488, 430, 50, 20)
GUICtrlSetOnEvent(-1, &Button3Click&)
$Button4 = GUICtrlCreateButton(&写 入&, 488, 459, 50, 20)
GUICtrlSetOnEvent(-1, &Button4Click&)
$Button5 = GUICtrlCreateButton(&写 入&, 488, 488, 50, 20)
GUICtrlSetOnEvent(-1, &Button5Click&)
$Button6 = GUICtrlCreateButton(&写 入&, 488, 518, 50, 20)
GUICtrlSetOnEvent(-1, &Button6Click&)
$Button7 = GUICtrlCreateButton(&写 入&, 488, 547, 50, 20)
GUICtrlSetOnEvent(-1, &Button7Click&)
$Button8 = GUICtrlCreateButton(&写 入&, 488, 576, 50, 20)
GUICtrlSetOnEvent(-1, &Button8Click&)
$Button9 = GUICtrlCreateButton(&写 入&, 488, 605, 50, 20)
GUICtrlSetOnEvent(-1, &Button9Click&)
$Button10 = GUICtrlCreateButton(&写 入&, 488, 635, 50, 20)
GUICtrlSetOnEvent(-1, &Button10Click&)
$Button11 = GUICtrlCreateButton(&写 入&, 488, 664, 50, 20)
GUICtrlSetOnEvent(-1, &Button11Click&)
;**** 新+按钮 ****
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
& && &&&Sleep(100)
WEnd
Func Edit1Change()
EndFunc& &;==&Edit1Change
Func Form1Close()
& && &&&Exit
EndFunc& &;==&Form1Close
Func Button1Click() ; 保存+显示到备份总表
& && &&&If $caput_text = False Then _caput_text()
& && &&&$Title = GUICtrlRead($Input1);读取第一个姓名输入框里的类容
& && &&&$Name0 = GUICtrlRead($Input2);读取第一个联系方式输入框里的类容
& && &&&# 读取 $Button1 按钮文本, 确定后续操作
& && &&&Local $GetText = ControlGetText(&信息备份&, &&, $Button1)
& && &&&If $GetText = '保 存' Then
& && && && && & $X = GUICtrlRead($Input3)
& && && && && & $Y = GUICtrlRead($Input4)
& && && && && & _enquiry_Ok();转到 调试询问
& && &&&ElseIf $GetText = '未点中' Then
& && && && && & _enquiry_Nay();转到 调试询问
& && &&&ElseIf $GetText = '没有了' Then
& && && && && & WinClose(&信息备份&);关闭向导窗口
& && &&&EndIf
EndFunc& &
Func Button2Click() ;
& && &&&# 读取 $Button2 按钮文本, 确定后续操作
& && &&&Local $GetText02 = ControlGetText(&信息备份&, &&, $Button2)
& && &&&If $GetText02 = '清 除' Then
& && &&&ElseIf $GetText02 = '全 写 入' Then
& && && && && & $yszb = GUICtrlRead($Input5)
& && && && && & $sz = GUICtrlRead($Input6)
& && && && && & $tpqy = GUICtrlRead($Input7)
& && && && && & $tp = GUICtrlRead($Input8)
& && && && && & $xra = GUICtrlRead($Input9)
& && && && && & $xrb = GUICtrlRead($Input10)
& && && && && & $xrc = GUICtrlRead($Input11)
& && && && && & $xrd= GUICtrlRead($Input12)
& && && && && & $xre= GUICtrlRead($Input13)
& && && && && & $xrf= GUICtrlRead($Input14)
& && && && && & _GUICtrlEdit_AppendText($Edit1, '姓 名(' & $yszb & ')联系方式(' & $sz & ')' & @CRLF);写入主窗编辑框
& && && && && & _GUICtrlEdit_AppendText($Edit1, '姓 名(' & $tpqy & ')联系方式(' & $tp & ')' & @CRLF);写入主窗编辑框
& && && && && & _GUICtrlEdit_AppendText($Edit1, '姓 名(' & $xra & ')联系方式(' & $xrb & ')' & @CRLF);写入主窗编辑框
& && && && && & _GUICtrlEdit_AppendText($Edit1, '姓 名(' & $xrc & ')联系方式(' & $xrd & ')' & @CRLF);写入主窗编辑框
& && && && && & _GUICtrlEdit_AppendText($Edit1, '姓 名(' & $xre & ')联系方式(' & $xrf & ')' & @CRLF);写入主窗编辑框
& && &&&EndIf
EndFunc& &;==&Button2Click
Func Button3Click() ; 输入代码
EndFunc& &;==&Button3Click
Func Button4Click() ; 输入代码
EndFunc& &;==&Button4Click
Func Button5Click() ; 输入代码
EndFunc& &;==&Button5Click
Func Button6Click() ; 输入代码
EndFunc& &;==&Button6Click
Func Button7Click() ; 输入代码
EndFunc& &;==&Button7Click
Func Button8Click() ; 输入代码
EndFunc& &;==&Button8Click
Func Button9Click() ; 输入代码
EndFunc& &;==&Button9Click
Func Button10Click() ; 输入代码
EndFunc& &;==&Button10Click
Func Button11Click() ; 输入代码
EndFunc& &;==&Button11Click
Func _enquiry_Ok() ;这里是替换按钮1的名称!
& && &&&# 修改 '保 存' 按钮文本
& && &&&ControlSetText(&信息备份&, &&, $Button1, &写 入&)
& && &&&# 显示 '确认' 按钮
& && &&&GUICtrlSetState($Button2, $GUI_SHOW)
& && &&&ControlSetText(&信息备份&, &&, $Button2, &全 写 入&)
EndFunc& &;==&_enquiry_Ok
Func _enquiry_Nay() ;按钮文本 = 没有 的调试询问
& && &&&# 修改 '清 除' 按钮文本
& && &&&ControlSetText(&信息备份&, &&, $Button1, &保 存&)
& && &&&# 显示 $Button2 按钮
& && &&&GUICtrlSetState($Button2, $GUI_HIDE)
EndFunc& &;==&_enquiry_Nay
Func _caput_text()
& && &&&$Title = GUICtrlRead($Input1);读取窗口标题
& && &&&$Name0 = GUICtrlRead($Input2);读取控件 ID
& && &&&$caput_text = True
& && &&&;Button1Click()
EndFunc&&复制代码这个代码现在的问题是!可以读取写入!但是不会保存!工具关了在开就不见了!还是一个问题是只可以点保存按钮保存所有框里的文字,我想对应一行的按钮按那一行的就保存哪一行的文字!!,
需要修改时候只用在小输入框内修改文字点击写入后就替换原来对应的原始文字信息。劳烦各位大角了!!!!!
附件: 您需要才可以下载或查看附件。没有帐号?
帖子6585&精华1&积分4936&威望213 点&金钱53228 块&贡献1207 分&阅读权限90&在线时间3805 小时&注册时间&最后登录&
保存到什么地方了,autoit又没有内部保存机制
帖子405&精华0&积分386&威望36 点&金钱5185 块&贡献111 分&阅读权限30&在线时间779 小时&注册时间&最后登录&
这个用AutoIt做注定是 蛋疼滴 ,建议不要用edit&&,改用 list 或listview
用delphi吧 delphi 的Edit控件(Memo) ,可以按行操作的,
帖子712&精华0&积分441&威望25 点&金钱4929 块&贡献35 分&阅读权限30&在线时间321 小时&注册时间&最后登录&
写入到ini文件吧.
帖子1804&精华0&积分1213&威望63 点&金钱11600 块&贡献185 分&阅读权限70&在线时间1026 小时&注册时间&最后登录&
楼主这样的话,如果有100人就写100个输入框,一百个函数来做相同的事??不如直接用ini(如果数据量巨大还可以用A大的_ini系列UDF)
帖子1804&精华0&积分1213&威望63 点&金钱11600 块&贡献185 分&阅读权限70&在线时间1026 小时&注册时间&最后登录&
吃饭前,当灌一下水吧~~
;没有加什么数据合法性判断等,如果需要,请自己酌情添加
(&GUIOnEventMode&, 1)
$sINI=@ScriptDir&'\ini.ini'
$Form1 = (&test&, 185, 310)
(-3,'_exit')
$Label1 = (&姓 & &名:&, 6, 6, 55, 17)
$Label2 = (&联系方式:&, 6, 39, 55, 17)
$Label3 = (&邮 & &编:&, 6, 72, 55, 17)
$Input1 = (&&, 66, 6, 115, 21)
$Input2 = (&&, 66, 36, 115, 21)
$Input3 = (&&, 66, 66, 115, 21,0x2000)
$Button1 = (&写入&, 0, 102, 75, 25,1)
(-1,'填好后回车确认写入!')
(-1,'Write')
$Button2 = (&删除&, 102, 102, 75, 25)
(-1,'Delete')
$Edit1 = (&&, 0, 132, 181, 169)
()
& & & & (1000000)
Write()
& & & & $sName=($Input1)
& & & & $sContact=($Input2)
& & & & $sContact=($Input2)
& & & & $iPostCode=($Input3)
$sName &&''
& & & & & & ;允许其它信息为空,如果不允许,自己加判断吧
& & & & & & & & ($sINI,'姓名:'&$sName,'联系方式',$sContact)
& & & & & & & & ($sINI,'姓名:'&$sName,'邮编',$iPostCode)
($Edit1,($sINI));更新Edit内容
Delete()
& & & & $sName=($Input1)
& & & & ($sINI,'姓名:'&$sName)
& & & & ($Edit1,($sINI));更新Edit内容
_Exit()
复制代码 高亮切换
帖子1500&精华0&积分928&威望27 点&金钱8854 块&贡献124 分&阅读权限50&在线时间201 小时&注册时间&最后登录&
还是那么长& & - -!& &建议楼主简化问题& &小弟是在看得晕啊
你会选择玩电脑还是被电脑玩?
帖子497&精华0&积分371&威望80 点&金钱972 块&贡献-38 分&阅读权限30&在线时间51 小时&注册时间&最后登录&
& & 那请问一下!INI里面要怎么填~~~~~
帖子1804&精华0&积分1213&威望63 点&金钱11600 块&贡献185 分&阅读权限70&在线时间1026 小时&注册时间&最后登录&
qiziyun7410
我觉得如果你愿意动一下手的话应该已经知道了
直接复制/粘贴代码,运行一下,在界面上随便输入一个人的信息,敲一下回车,马上就能看到了
帖子407&精华0&积分1353&威望221 点&金钱6825 块&贡献707 分&阅读权限70&在线时间496 小时&注册时间&最后登录&
可以参考使用vsFlex表格控件来做,在表格上编辑修改删除保存,任意条数据都可以方便操作,不需要建立一大堆input控件
帖子1804&精华0&积分1213&威望63 点&金钱11600 块&贡献185 分&阅读权限70&在线时间1026 小时&注册时间&最后登录&
还未解决??我前面的代码不行??
不要把别人变成帮你免费写代码的工具..
帖子140&精华0&积分120&威望10 点&金钱463 块&贡献30 分&阅读权限20&在线时间22 小时&注册时间&最后登录&
經過測試,樓上的代碼OK
帖子2775&精华0&积分2618&威望264 点&金钱13589 块&贡献702 分&阅读权限150&在线时间6419 小时&注册时间&最后登录&
换listview吧,好像论坛还有个listview就地编辑的。
分手说不出来
海鸟跟鱼相爱
只是一场意外
我们的爱差异一直存在
风中尘埃竟累积成伤害
帖子497&精华0&积分371&威望80 点&金钱972 块&贡献-38 分&阅读权限30&在线时间51 小时&注册时间&最后登录&
annybaby 是啊!我想要可以在上面填写后保留着,我看了一下一些帖子!就好比脚本生成那样!填写了以后点击生成文字的TXT或其他文本形式!!
[通过 QQ、MSN 分享给朋友]可以帮帮忙,急需要翻译成英文_百度知道
可以帮帮忙,急需要翻译成英文
业绩突出,质量达标。特此声明本公司在此郑重声明、仲裁和无破产记录。在此期间从未发生诉讼,深受业主好评:我公司自成立以来信用良好
Neither lawsuit nor arbitration has ever occurred 。Well received by owners.We company hereWell received by owners,outstanding performance.Neither lawsuit nor arbitration has ever occurred :We company is the one of fine credit reputation,质量达标,no bankruptcy records,no bankruptcy records我公司自成立以来信用良好.自成立以来Since founded在此期间从未发生诉讼.since founded,We company is the one of fine credit reputation, standard quality业绩突出, standard quality、仲裁和无破产记录,outstanding performance深受业主好评
其他类似问题
50人觉得有用
为您推荐:
其他4条回答
arbitration and no bankruptcy records never happened:本公司在此郑重声明!这个句子的英文为。特此声明,谢谢:我公司自成立以来信用良好、仲裁和无破产记录.During litigation, outstanding performance:he Company hereby declares that。, quality,质量达标,望采纳, by the owners praise,深受业主好评.希望能够帮到你,业绩突出。在此期间从未发生诉讼. It is hereby declared: since the company was founded with good credit您好
The company's record: the company since its inception, credit is good, quality, outstanding performance, by the owners praise. Never happened during litigation, arbitration and bankruptcy-free record. Please note that.
The company solemnly declare: since the establishment of the company with good credit, quality, outstanding performance, by the owner of the enterprise. This has never happened during the litigation, arbitration and non bankruptcy records. I hereby declare.以后这种英语翻译可以查查百度翻译!
HGLKUJHLIJL;;L&;L'';&';;;;KJHULLIOIOPOOPOP[]KKJJHHIKJJGTDGFFFGGHGHGHGHJGGJHJJK]'
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁她们可以这样穿我也可以
挑战者联盟预告
奔跑吧兄弟第三季
全员加速中
跟着贝尔去冒险
中韩梦之队竞技版
笑傲江湖第二季花絮
我是演说家第二季花絮
女婿上门了抢先看
巅峰拍挡第二季预告
世界青年说
悲情潘金莲命丧婚床
世界美丽奇特的情色电影
超级英雄回归力挽狂澜
大鹏华丽逆袭刷新十一亿票房
末世深眠海底求生存
僵尸世界的惊险旅行
赤裸裸的青春伊甸园
萝莉与萌叔拯救末世危机
揭秘赶尸人神秘禁忌
网络大电影版《小时代》
阿汤哥徒手爬迪拜高塔
法国艳后奢靡风流史
凯奇吴宇森经典科幻之作
女神的疯狂试爱