找回密码
 加入
搜索
查看: 5365|回复: 11

[GUI管理] AU3加载皮肤后退出read错误(已解决)

  [复制链接]
发表于 2011-4-2 22:28:40 | 显示全部楼层 |阅读模式
本帖最后由 zjppaa 于 2011-4-3 22:44 编辑

把皮肤去掉没事,一加载皮肤退出就错误了,附:退出段代码
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle) 
   $Dll = DllOpen($SkincrafterDll) 
   DllCall($Dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1") 
   DllCall($Dll, "int:cdecl", "InitDecoration", "int", 1) 
   DllCall($Dll, "int:cdecl", "LoadSkinFromFile", "wstr", $SkincrafterSkin) 
   DllCall($Dll, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25) 
   DllCall($Dll, "int:cdecl", "ApplySkin") 
   EndFunc
   
        EndSwitch

WEnd
发表于 2011-4-3 07:35:08 | 显示全部楼层
本帖最后由 guland 于 2011-4-3 07:37 编辑

回复 1# zjppaa

真杯具.....  因该多看看教程的
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle)      <======这是加载皮肤的代码
   $Dll = DllOpen($SkincrafterDll) 
   DllCall($Dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1") 
   DllCall($Dll, "int:cdecl", "InitDecoration", "int", 1) 
   DllCall($Dll, "int:cdecl", "LoadSkinFromFile", "wstr", $SkincrafterSkin) 
   DllCall($Dll, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25) 
   DllCall($Dll, "int:cdecl", "ApplySkin") 
   EndFunc
   
        EndSwitch   <==== 这是啥?

WEnd      <==== 这是啥?
Func Quit()   <=====这才是退出代码,退出时请调用
    GUISetState(@SW_HIDE)
    DllCall($dll, "int:cdecl", "DeInitDecoration")
    DllCall($dll, "int:cdecl", "RemoveSkin")
    DllClose($dll)
    Exit
EndFunc
 楼主| 发表于 2011-4-3 09:36:44 | 显示全部楼层
回楼上,后面部分替换成你的代码后出现了While声明没有匹配的WEND声明AUTOIT错误。另外我前面加载皮肤的代码是
_SkinGUI("SkinCrafterDll.dll", "Vista.skf", $mainwindow)

初学GUI。。。见谅,我会多看帮助的
发表于 2011-4-3 11:10:06 | 显示全部楼层
回复 3# zjppaa


    我没看懂你的意思,我的理解是你把
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle) 
   $Dll = DllOpen($SkincrafterDll) 
   DllCall($Dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1") 
   DllCall($Dll, "int:cdecl", "InitDecoration", "int", 1) 
   DllCall($Dll, "int:cdecl", "LoadSkinFromFile", "wstr", $SkincrafterSkin) 
   DllCall($Dll, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25) 
   DllCall($Dll, "int:cdecl", "ApplySkin") 
   EndFunc
   
        EndSwitch

WEnd
放到循环里面了是吗?
 楼主| 发表于 2011-4-3 11:19:54 | 显示全部楼层
本帖最后由 zjppaa 于 2011-4-3 15:00 编辑

我放在了代码都最后,然后就是运行没错误,退出就出现错误了

全部代表上:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$oIE = ObjCreate("Shell.Explorer.2")
#Region ### START Koda GUI section ### Form=
$mainwindow = GUICreate("转角网络电视V3.0桌面版", 610, 560)
_SkinGUI("SkinCrafterDll.dll", "Vista.skf", $mainwindow)
Dim $text = "", $Dir = "", $Dll
$GUIActiveX = GUICtrlCreateObj ($oIE, 0, 0, 600, 550)
$M2 = GUICtrlCreateMenu("刷新")
$M3 = GUICtrlCreateMenuItem("刷新", $M2)
$sz = GUICtrlCreateMenu("窗口设置")
$szzd = GUICtrlCreateMenuItem("设置置顶",$sz)
$qxzd = GUICtrlCreateMenuItem("取消置顶",$sz)
$oIE.navigate("http://zjppaa.com/tv")
GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###
Func _SkinGUI($SkincrafterDll, $SkincrafterSkin, $Handle) 
   $Dll = DllOpen($SkincrafterDll) 
   DllCall($Dll, "int:cdecl", "InitLicenKeys", "wstr", "1", "wstr", "", "wstr", "1@1.com", "wstr", "1") 
   DllCall($Dll, "int:cdecl", "InitDecoration", "int", 1) 
   DllCall($Dll, "int:cdecl", "LoadSkinFromFile", "wstr", $SkincrafterSkin) 
   DllCall($Dll, "int:cdecl", "DecorateAs", "int", $Handle, "int", 25) 
   DllCall($Dll, "int:cdecl", "ApplySkin") 
   EndFunc ;==>quit

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $szzd
                        WinSetOnTop("转角网络电视V3.0桌面版", "", 1)
                Case $qxzd
                        WinSetOnTop("转角网络电视V3.0桌面版", "", 0)
                Case $M3
                        $oIE.navigate("http://zjppaa.com/tv")
EndSwitch

WEnd
发表于 2011-4-3 19:00:00 | 显示全部楼层
回楼上,后面部分替换成你的代码后出现了While声明没有匹配的WEND声明AUTOIT错误。另外我前面加载皮肤的代码 ...
zjppaa 发表于 2011-4-3 09:36

已经不是初学GUI的问题了。而是不懂装懂。
退出函数已经给你了,还要怎样?
 楼主| 发表于 2011-4-3 19:17:15 | 显示全部楼层
已经不是初学GUI的问题了。而是不懂装懂。
退出函数已经给你了,还要怎样?
3mile 发表于 2011-4-3 19:00



    第一 我本来就是初学GUI
    第二 我本来就是不懂,不懂才来问。
   第三 退出函数更换后还是出错,问题没解决,就追问下去,有何错误?
发表于 2011-4-3 19:28:43 | 显示全部楼层
回复 7# zjppaa
呵呵,你还来劲了。
不想说你了。当然更不会帮你
 楼主| 发表于 2011-4-3 19:39:57 | 显示全部楼层
回复  zjppaa
呵呵,你还来劲了。
不想说你了。当然更不会帮你
3mile 发表于 2011-4-3 19:28


随便你怎么认为。
我没来劲
既然不想帮我的话,请你不要回复本帖子,在那里说一些风凉话!
发表于 2011-4-3 19:42:01 | 显示全部楼层
本帖最后由 ROUSTAR31 于 2011-4-3 19:44 编辑

楼主的循环结束语句放错地方
还有若修正循环语句位置错误,还是报错,可能和那个dll破解不完全有关。
相关帖子:http://www.autoitx.com/forum.php ... hlight=%C6%A4%B7%F4

另外几位大大和楼主都貌似火气很大的样子,消消火
 楼主| 发表于 2011-4-3 22:43:41 | 显示全部楼层
感谢楼上那位兄弟,问题解决了!
发表于 2012-8-29 17:26:38 | 显示全部楼层
鸟多了,林子热闹了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-6-1 09:37 , Processed in 0.082222 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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