找回密码
 加入
搜索
楼主: superflq

这样的GUICtrlCreateInput怎么创建[困难]

 火.. [复制链接]
发表于 2009-8-18 21:57:08 | 显示全部楼层
阅读权限不够,哭...
发表于 2009-8-19 16:18:17 | 显示全部楼层
学习。。。。有用
发表于 2009-8-24 00:45:42 | 显示全部楼层
很有用处,下载下来看看哈
发表于 2009-9-18 23:18:22 | 显示全部楼层
看看我行不行能不能下载
发表于 2009-9-19 14:21:51 | 显示全部楼层
权限不够。失败、
发表于 2009-9-20 08:21:08 | 显示全部楼层
不是看不懂这些,再逛逛
发表于 2009-9-23 00:41:10 | 显示全部楼层
试试这个看,应该符合LZ的要求了
  1. #include <GUIConstantsEx.au3>

  2. Opt('MustDeclareVars', 1)
  3. Local $input, $btn, $msg, $dat, $len, $ctrlhandle

  4. GUICreate("input", 130, 80)
  5. $input = GUICtrlCreateInput("", 10, 5, 110, 20)
  6. GUICtrlSetLimit(-1, 17)
  7. $btn = GUICtrlCreateButton("Ok", 35, 45, 60, 20)
  8. GUISetState()
  9. While $msg <> $GUI_EVENT_CLOSE
  10.         $msg = GUIGetMsg()
  11.         Switch $msg
  12.                 Case $btn
  13.                         MsgBox(4096, "", GUICtrlRead($input))
  14.         EndSwitch
  15.         reinput($input)
  16. WEnd

  17. Func reinput($ctrlhandle)
  18.         $dat = GUICtrlRead($ctrlhandle)
  19.         $len = StringLen($dat)
  20.         If $len = 2 Or $len = 5 Or $len = 8 Or $len = 11 Or $len = 14 Then
  21.                 GUICtrlSetData($ctrlhandle, $dat & "-")
  22.         EndIf
  23. EndFunc   ;==>reinput
复制代码
 楼主| 发表于 2009-9-25 13:37:39 | 显示全部楼层
试试这个看,应该符合LZ的要求了#include

Opt('MustDeclareVars', 1)
Local $input, $btn, $msg, $dat, $len, $ctrlhandle

GUICreate("input", 130, 80)
$input = GUICtrlCreateInput("", 10, 5, 110, 20)
...
298311657 发表于 2009-9-23 00:41


这个解决方法到时很简单,
发表于 2009-9-26 10:35:28 | 显示全部楼层
阅读权限什么时候可以到
发表于 2009-9-29 17:14:33 | 显示全部楼层
真的是不错!
发表于 2009-10-24 02:10:33 | 显示全部楼层
慢慢研究
发表于 2010-11-25 10:55:13 | 显示全部楼层
学习了,37楼的方法很好
发表于 2011-1-24 14:42:00 | 显示全部楼层
我现在想做的是 input默认值是一个path的,不知道如何实现
发表于 2011-3-15 05:14:21 | 显示全部楼层
回复 1# superflq


    好东西啊 ~~~留个脚印
发表于 2011-3-15 05:14:57 | 显示全部楼层
回复 44# 子非鱼


        好东西啊 ~~~留个脚印
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2026-9-27 10:59 , Processed in 0.313241 second(s), 14 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2026 Discuz! Team.

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