tombrown 发表于 2009-5-31 16:46:27

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

本帖最后由 tombrown 于 2009-5-31 17:05 编辑

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

本人想做一个EXE,运行SQL的一些语句,要用到用户输入的数字

pig 发表于 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()读取

jhun 发表于 2009-6-24 16:59:20

MsgBox(0,"显示","您输入的内容是:"&InputBox("请输入","请输入一些内容","","",1,1))
页: [1]
查看完整版本: 请教,如何让用户输入一个数字,传递到脚本的函数里?