找回密码
 加入
搜索
查看: 1539|回复: 2

请教,如何让用户输入一个数字,传递到脚本的函数里?

[复制链接]
发表于 2009-5-31 16:46:27 | 显示全部楼层 |阅读模式
本帖最后由 tombrown 于 2009-5-31 17:05 编辑

请教,如何让用户输入一个数字,传递到脚本的函数里?

本人想做一个EXE,运行SQL的一些语句,要用到用户输入的数字
发表于 2009-6-24 16:54:32 | 显示全部楼层
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("窗体1", 413, 298, 302, 218)
$Input1 = GUICtrlCreateInput("1", 40, 32, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
$Button1 = GUICtrlCreateButton("显示", 168, 32, 75, 25, $WS_GROUP)
GUICtrlSetOnEvent(-1, "Button1Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        Sleep(100)
WEnd
Func Button1Click()
MsgBox(0,0,GUICtrlRead($Input1))
EndFunc
用GUICtrlCreateInput()建立输入框
用GUICtrlRead()读取
发表于 2009-6-24 16:59:20 | 显示全部楼层
MsgBox(0,"显示","您输入的内容是:"&InputBox("请输入","请输入一些内容","","",1,1))
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-23 01:30 , Processed in 0.076880 second(s), 22 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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