zjppaa 发表于 2011-4-2 22:28:40

AU3加载皮肤后退出read错误(已解决)

本帖最后由 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

guland 发表于 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

zjppaa 发表于 2011-4-3 09:36:44

回楼上,后面部分替换成你的代码后出现了While声明没有匹配的WEND声明AUTOIT错误。另外我前面加载皮肤的代码是_SkinGUI("SkinCrafterDll.dll", "Vista.skf", $mainwindow)
初学GUI。。。见谅,我会多看帮助的

guland 发表于 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放到循环里面了是吗?

zjppaa 发表于 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

3mile 发表于 2011-4-3 19:00:00

回楼上,后面部分替换成你的代码后出现了While声明没有匹配的WEND声明AUTOIT错误。另外我前面加载皮肤的代码 ...
zjppaa 发表于 2011-4-3 09:36 http://www.autoitx.com/images/common/back.gif
已经不是初学GUI的问题了。而是不懂装懂。
退出函数已经给你了,还要怎样?

zjppaa 发表于 2011-4-3 19:17:15

已经不是初学GUI的问题了。而是不懂装懂。
退出函数已经给你了,还要怎样?
3mile 发表于 2011-4-3 19:00 http://www.autoitx.com/images/common/back.gif


    第一 我本来就是初学GUI
    第二 我本来就是不懂,不懂才来问。
   第三 退出函数更换后还是出错,问题没解决,就追问下去,有何错误?

3mile 发表于 2011-4-3 19:28:43

回复 7# zjppaa
呵呵,你还来劲了。
不想说你了。当然更不会帮你

zjppaa 发表于 2011-4-3 19:39:57

回复zjppaa
呵呵,你还来劲了。
不想说你了。当然更不会帮你
3mile 发表于 2011-4-3 19:28 http://www.autoitx.com/images/common/back.gif

随便你怎么认为。
我没来劲
既然不想帮我的话,请你不要回复本帖子,在那里说一些风凉话!

ROUSTAR31 发表于 2011-4-3 19:42:01

本帖最后由 ROUSTAR31 于 2011-4-3 19:44 编辑

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

另外几位大大和楼主都貌似火气很大的样子,消消火

zjppaa 发表于 2011-4-3 22:43:41

感谢楼上那位兄弟,问题解决了!

bacoln 发表于 2012-8-29 17:26:38

鸟多了,林子热闹了
页: [1]
查看完整版本: AU3加载皮肤后退出read错误(已解决)