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

[AU3基础] 不知道什么情况!点按钮没反应!!!

  [复制链接]
发表于 2012-1-20 19:17:02 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
#Include <WinAPIEx.au3>
FileInstall("office2007.she",@TempDir & "\office2007.she",1)
FileInstall("QQ2009.she",@TempDir & "\QQ2009.she",1)
FileInstall("Skin.dll",@TempDir &"\Skin.dll",1)
$skins=@TempDir & "\QQ2009.she"
$dll = DllOpen(@TempDir &"\Skin.dll")
DllCall($Dll, "int", "SkinH_AttachEx", "str", $skins, "str", "mhgd")
Opt('GUIOnEventMode', 1)
Global $zhuwidth = 300, $zhuheight = 200
Global $mzwidth = 60, $mzheight = 60
Global $mytupian = @ScriptDir & "\img\Christmas bells.png"
 
Global $zhu_gui = GUICreate("设置文件属性", 339, 236, 192, 124)
$Button1 = GUICtrlCreateButton("设置属性", 24, 190, 81, 33)
$Button2 = GUICtrlCreateButton("清除属性", 132, 190, 81, 32)
$Button3 = GUICtrlCreateButton("浏览文件夹", 234, 190, 81, 32)
$Checkbox1 = GUICtrlCreateCheckbox("只读", 128, 8, 81, 25)
$Checkbox2 = GUICtrlCreateCheckbox("存档", 128, 30, 81, 25)
$Checkbox3 = GUICtrlCreateCheckbox("系统文件", 128, 50, 81, 25)
$Checkbox4 = GUICtrlCreateCheckbox("隐藏文件", 128, 70, 81, 25)
$Checkbox5 = GUICtrlCreateCheckbox("普通", 128, 90, 81, 25)
$Checkbox6 = GUICtrlCreateCheckbox("脱机文件", 128, 110, 81, 25)
$Checkbox7 = GUICtrlCreateCheckbox("临时文件", 128, 130, 81, 25)
$Checkbox8 = GUICtrlCreateCheckbox("应用到所有子目录", 128, 150, 120, 25)
GUISetOnEvent($GUI_EVENT_CLOSE, "exitfunc")
;GUICtrlSetFont(-1, 24)    设置指定控件的字体
GUICtrlSetColor(-1, 0x0860a8)
Global $mao_gui = GUICreate("", $mzwidth, $mzheight, -$mzwidth / 2, -$mzheight / 1.5, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD, $WS_EX_TRANSPARENT), $zhu_gui)
_maozi()
 
GUISetState(@SW_SHOW, $mao_gui)
GUISetState(@SW_SHOW, $zhu_gui)
 Local $xxxxx = 1
 While $xxxxx = 1
        $nMsg = GUIGetMsg()
        Select
                        Case $nMsg= $Button3
                                $wjj = FileSelectFolder("选择文件夹", "",7)
                        Case $nMsg= $Button1
                                $d1g = GUICtrlRead($Checkbox1)
                                $d2g = GUICtrlRead($Checkbox2)
                                $d3g = GUICtrlRead($Checkbox3)
                                $d4g = GUICtrlRead($Checkbox4)
                                $d5g = GUICtrlRead($Checkbox5)
                                $d6g = GUICtrlRead($Checkbox6)
                                $d7g = GUICtrlRead($Checkbox7)
                                $d8g = GUICtrlRead($Checkbox8)
                                If $d1g = 1 Then $r = "R"
                                If $d1g = 4 Then $r = ""
                                If $d2g = 1 Then $a = "A"
                                If $d2g = 4 Then $a = ""
                                If $d3g = 1 Then $s = "S"
                                If $d3g = 4 Then $s = ""
                                If $d4g = 1 Then $h = "H"
                                If $d4g = 4 Then $h = ""
                                If $d5g = 1 Then $n = "N"
                                If $d5g = 4 Then $n = ""
                                If $d6g = 1 Then $o = "O"
                                If $d6g = 4 Then $o = ""
                                If $d7g = 1 Then $t = "T"
                                If $d7g = 4 Then $t = ""
                                If $d8g = 1 Then $d8g = 1
                                If $d8g = 4 Then $d8g = 0
                                If $wjj = ""  Then 
                                MsgBox (0,"你没有选择文件夹","无法更改文件夹属性")
                        Else                                                
                                $zzd = $r&$a&$s&$h&$n&$o&$t
                                FileSetAttrib($wjj, "+"&$zzd,$d8g)
                                MsgBox(0,$wjj,$zzd&$d8g)
                                $zzd = ""
                        EndIf
                Case $nMsg= $Button2
                        $d1g = GUICtrlRead($Checkbox1)
                        $d2g = GUICtrlRead($Checkbox2)
                        $d3g = GUICtrlRead($Checkbox3)
                        $d4g = GUICtrlRead($Checkbox4)
                        $d5g = GUICtrlRead($Checkbox5)
                        $d6g = GUICtrlRead($Checkbox6)
                        $d7g = GUICtrlRead($Checkbox7)
                        $d8g = GUICtrlRead($Checkbox8)
                        If $d1g = 1 Then $r = "R"
                        If $d1g = 4 Then $r = ""
                        If $d2g = 1 Then $a = "A"
                        If $d2g = 4 Then $a = ""
                        If $d3g = 1 Then $s = "S"
                        If $d3g = 4 Then $s = ""
                        If $d4g = 1 Then $h = "H"
                        If $d4g = 4 Then $h = ""
                        If $d5g = 1 Then $n = "N"
                        If $d5g = 4 Then $n = ""
                        If $d6g = 1 Then $o = "O"
                        If $d6g = 4 Then $o = ""
                        If $d7g = 1 Then $t = "T"
                        If $d7g = 4 Then $t = ""
                        If $d8g = 1 Then $d8g = 1
                        If $d8g = 4 Then $d8g = 0
                        If $wjj = ""  Then 
                        MsgBox (0,"你没有选择文件夹","无法更改文件夹属性")
                Else                                                
                        $zzd = $r&$a&$s&$h&$n&$o&$t
                        FileSetAttrib($wjj, "-"&$zzd,$d8g)
                        MsgBox(0,$wjj,$zzd)
                        $zzd = ""
                EndIf
                
        EndSelect
        WEnd
        
Func exitfunc()
        Exit
EndFunc   ;==>exitfunc
 
Func _maozi()
        _GDIPlus_Startup()
        Local $hHBITMAP = _WinAPI_CreateBitmap($mzwidth, $mzheight, 1, 32)
        Local $hCDC = _WinAPI_CreateCompatibleDC(0)
        Local $hOld = _WinAPI_SelectObject($hCDC, $hHBITMAP)
        Local $hGraphic = _GDIPlus_GraphicsCreateFromHDC($hCDC)
        Local $kzImage = _GDIPlus_ImageLoadFromFile($mytupian)
        _GDIPlus_GraphicsDrawImageRectRect($hGraphic, $kzImage, 0, 0, _GDIPlus_ImageGetWidth($kzImage), _GDIPlus_ImageGetHeight($kzImage), 0, 0, $mzwidth, $mzheight)
        _GDIPlus_ImageDispose($kzImage)
        _GDIPlus_GraphicsDispose($hGraphic)
        _WinAPI_SelectObject($hCDC, $hOld)
        _WinAPI_DeleteDC($hCDC)
        _GDIPlus_Shutdown()
        _WinAPI_UpdateLayeredWindowEx($mao_gui, -1, -1, $hHBITMAP, 255, 1)
EndFunc   ;==>_maozi
这个要怎么解决啊!!
 楼主| 发表于 2012-1-20 19:32:38 | 显示全部楼层
没有人帮帮忙吗??????
 楼主| 发表于 2012-1-20 19:33:24 | 显示全部楼层
我不知道为什么点窗体上的按钮一点反应都没有!!!!!!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-2 19:15 , Processed in 0.079189 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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