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

请高手帮忙指教一下

[复制链接]
发表于 2009-5-13 18:41:26 | 显示全部楼层 |阅读模式
本帖最后由 17911 于 2009-5-13 18:43 编辑

在官网资料区看见皮肤调用脚本如下,设置后发现皮肤文件只能在脚本根目录下才能调用,请问如果想调用D:\123中的皮肤文件(如D:\123\fgh.skf、D:\123\dfg.skf 、D:\123\ddd.skf)该如何设置路径,自己编辑几次不成功,请高手帮助编辑一下
if not FileExists("SkinCrafterDll.dll") Then
MsgBox(64, "错误", "当前目录没有SkinCrafterDll.dll文件",5)
Exit
EndIf
$xx=0
$search = FileFindFirstFile("*.skf")  
If $search = -1 Then
   MsgBox(64, "错误", "当前目录没有可用的.skf文件",5)
Exit
EndIf
While 1
    $file = FileFindNextFile($search)
    If @error Then ExitLoop
    $bf=$file
   $xx=$xx+1
WEnd
FileClose($search)
#include <GUIConstantsEx.au3>
MsgBox(64,"提示","一共找到"&$xx&"张皮肤")
Global $Dll , $Progress1
formbf()


Func formbf()
$Form1 = GUICreate("皮肤例子", 345, 184, 313, 309)
_SkinGUI("SkinCrafterDll.dll", $bf, $Form1)
$Group1 = GUICtrlCreateGroup("基本", 8, 8, 321, 129)
$Combo1 = GUICtrlCreateCombo("选择皮肤", 24, 40, 105, 25)
GUICtrlSetData($Combo1,$bf)
$Input1 = GUICtrlCreateInput("内容", 24, 80, 97, 21)
$Checkbox1 = GUICtrlCreateCheckbox("哈哈", 152, 32, 45, 25)
$Radio1 = GUICtrlCreateRadio("嘻嘻", 152, 72, 45, 25)
$List1 = GUICtrlCreateList("", 216, 32, 81, 84)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Progress1 = GUICtrlCreateProgress(8, 154, 241, 10)
$Button1 = GUICtrlCreateButton("退出", 272, 144, 49, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

GUICtrlSetData($Input1,$bf &"皮肤")
$search = FileFindFirstFile("*.skf")  
If $search = -1 Then
   MsgBox(64, "错误", "当前目录没有可用的.skf文件",5)
Exit
EndIf
While 1
    $file = FileFindNextFile($search)
    If @error Then ExitLoop
      GUICtrlSetData($List1,$file)
    GUICtrlSetData($Combo1,$file)
WEnd
FileClose($search)
jd()
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                        Case $GUI_EVENT_CLOSE
                 Quit()
                        Exit
                case $Button1
             Quit()
               Exit
         Case $Combo1
            $bf=GUICtrlRead ( $Combo1)
            GUIDelete ( $Form1)
                    formbf()
             ExitLoop
         Case $List1
            $bf=GUICtrlRead ( $List1)
            GUIDelete ( $Form1)
                    formbf()
             ExitLoop
        EndSwitch
WEnd

EndFunc

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      ;==_



Func Quit()
    GUISetState(@SW_HIDE)
    DllCall($dll, "int:cdecl", "DeInitDecoration")
    DllCall($dll, "int:cdecl", "RemoveSkin")
    DllClose($dll)
    ;DirRemove(@AppDataDir&"\skin",1)
    Exit
EndFunc


Func jd()
   GUICtrlSetData($Progress1,"10%")
Sleep(100)
   GUICtrlSetData($Progress1,"20%")
Sleep(100)
   GUICtrlSetData($Progress1,"30%")
Sleep(100)
   GUICtrlSetData($Progress1,"40%")
Sleep(100)
GUICtrlSetData($Progress1,"50%")
Sleep(100)
GUICtrlSetData($Progress1,"60%")
Sleep(100)
GUICtrlSetData($Progress1,"70%")
Sleep(100)
GUICtrlSetData($Progress1,"80%")
Sleep(100)
GUICtrlSetData($Progress1,"90%")
Sleep(100)
GUICtrlSetData($Progress1,"100%")
Sleep(100)
EndFunc
发表于 2009-5-13 21:11:54 | 显示全部楼层
应该没问题的 把相对路径换成绝对路径就行了
SkinCrafterDll.dll
d:\123\SkinCrafterDll.dll
 楼主| 发表于 2009-5-13 23:12:19 | 显示全部楼层
本帖最后由 17911 于 2009-5-13 23:13 编辑
应该没问题的 把相对路径换成绝对路径就行了
SkinCrafterDll.dll
d:\123\SkinCrafterDll.dll


SkinCrafterDll.dll设置绝对路径没有问题,不过皮肤文件试了几次都不可以,比较晕
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-15 08:41 , Processed in 0.072327 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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