Opt('GUIOnEventMode', 1)
Dim $ll, $Form1, $Button__1, $Button__2, $Input__1, $Button__3, $nuke1
$Form1 = GUICreate('请选择nuke项目目录', 312, 115, 379, 143)
GUISetOnEvent(-3, 'tuichu');退出按钮
$Button__1 = GUICtrlCreateButton('确定(&O)', 33, 75, 75, 25, 0)
GUICtrlSetOnEvent($Button__1, 'Example');确定按钮
$Button__2 = GUICtrlCreateButton('取消(&C)', 130, 75, 75, 25, 0)
GUICtrlSetOnEvent($Button__2, 'tuichu');取消按钮
$Input__1 = GUICtrlCreateInput('选择目录', 8, 40, 217, 21)
$Button__3 = GUICtrlCreateButton('浏览(&R)', 232, 40, 75, 25, 0)
GUICtrlSetOnEvent($Button__3, 'liulang');浏览按钮
GUISetState(@SW_SHOW)
While 1
Sleep(100)
WEnd
Func liulang();浏览按钮,
$ll = FileSelectFolder('浏览', '')
If FileExists($ll) Then GUICtrlSetData($Input__1, $ll)
EndFunc ;==>liulang
Func tuichu();退出按钮
Exit
EndFunc ;==>tuichu
Func Example()
GUISetState(@SW_HIDE, $Form1)
Opt('GUIOnEventMode', 0)
Opt('GUICoordMode', 2)
$bmp = FileFindFirstFile($ll & '\*.bmp')
$nk = FileFindFirstFile($ll & '\*.nk')
$nuke1 = 'C:\Program Files\Nuke6.0v3\Nuke6.0.exe ' & $ll & FileFindNextFile($nk)
$Form2 = GUICreate('NUKE工程', 1080, 330, 20, 20, 0x00380000)
Local $Button_1 = GUICtrlCreateButton('', 10, 10, 130, 130, 0x81, 0x00000310)
GUISetState()
While 1
Switch GUIGetMsg()
Case -3
GUIDelete()
Opt('GUIOnEventMode', 1)
GUISwitch($Form1)
GUISetState(@SW_SHOW)
ExitLoop
Case $Button_1
MsgBox(0, 0, '点击了超大按钮 _ _||')
EndSwitch
WEnd
EndFunc ;==>Example