#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $stp = 1
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("向导窗口演示 By PcBar", 450, 221, -1, -1)
$Label1 = GUICtrlCreateLabel("", 16, 16, 400, 20)
GUICtrlSetFont(-1, 12, 600, 0, "楷体_GB2312")
$Edit1 = GUICtrlCreateEdit("", 40, 40, 369, 129, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL), 0)
GUICtrlSetData(-1, "Edit1")
GUICtrlCreateLabel("", 0, 178, 450, 1, $SS_SUNKEN)
$Radio1 = GUICtrlCreateRadio("A.搜索引擎", 120, 64, 113, 25)
$Radio2 = GUICtrlCreateRadio("B.网友介绍", 120, 96, 113, 25)
$Radio3 = GUICtrlCreateRadio("C.传统纸媒", 120, 128, 121, 25)
GUICtrlSetState($Radio1, $gui_hide)
GUICtrlSetState($Radio2, $gui_hide)
GUICtrlSetState($Radio3, $gui_hide)
$Button1 = GUICtrlCreateButton("< 上一步[&B]", 200, 185, 89, 25, 0)
$Button2 = GUICtrlCreateButton("下一步[&N] >", 325, 185, 89, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### START Koda GUI section ### Form=
step1(1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Call("step" & $stp, 0)
$stp -= 1
Call("step" & $stp, 1)
Case $Button2
if GUICtrlRead($Button2)="完成[&F]" Then
Exit
EndIf
Call("step" & $stp, 0)
$stp += 1
Call("step" & $stp, 1)
EndSwitch
WEnd
Func step1($x)
If $x = 1 Then
GUICtrlSetState($Button1, $gui_disable)
GUICtrlSetData($Label1, "欢迎访问AUTOIT中文站(www.autoitx.com)!")
GUICtrlSetData($Edit1, @CRLF & "欢迎下载使用本程序,这是一个简单的autoit示例。" & _
@CRLF & @CRLF & "本程序使用单Form,通过控件操作演示了向导窗口。")
Else
GUICtrlSetState($Button1, $gui_enable)
EndIf
EndFunc ;==>step1
Func Step2($x)
If $x = 1 Then
GUICtrlSetData($Label1, "本程序不会收集您的信息,只是显示一下,请放心。")
GUICtrlSetData($Edit1, @CRLF&"以下是您的电脑配置信息:" & @CRLF & _
@CRLF & "操作系统:" & @OSVersion & " " & @OSServicePack & " 内部版本号: " & @OSBuild & _
@CRLF & "计算机名称:" & @ComputerName & _
@CRLF & "当前用户名:" & @UserName & _
@CRLF & "第一块网卡的IP地址:" & @IPAddress1 & _
@CRLF & "您的AUTOIT版本:" & @AutoItVersion)
Else
EndIf
EndFunc ;==>Step2
Func step3($x)
If $x = 1 Then
GUICtrlSetData($Label1, "你是从何处得知本站的?(演示显示/隐藏控件)")
GUICtrlSetState($Edit1, $gui_hide)
GUICtrlSetState($Radio1, $gui_show)
GUICtrlSetState($Radio2, $gui_show)
GUICtrlSetState($Radio3, $gui_show)
Else
GUICtrlSetState($Edit1, $gui_show)
GUICtrlSetState($Radio1, $gui_hide)
GUICtrlSetState($Radio2, $gui_hide)
GUICtrlSetState($Radio3, $gui_hide)
EndIf
EndFunc ;==>step3
Func step4($x)
If $x = 1 Then
GUICtrlSetData($Button2,"完成[&F]")
GUICtrlSetData($Label1, "程序演示结束,谢谢!")
GUICtrlSetData($Edit1, @CRLF & "演示完成." & _
@CRLF & @CRLF & "作者: PCBAR " & _
@CRLF & @CRLF & "QQ:45539511" & _
@CRLF & @CRLF & "2008-08-04")
Else
GUICtrlSetData($Button2,"下一步[&N] >")
EndIf
EndFunc ;==>step4