回复 14# cjhhuanshao
这样可以吗?
#include <GUIConstantsEx.au3>
GUICreate(" GUI 按钮", 310, 55); 创建居中显示的对话框窗口
$Button1 = GUICtrlCreateButton("确定", 260, 25, 45, 25)
GUICtrlCreateLabel(":当前皮肤路径", 5, 10)
$Input = GUICtrlCreateInput("", 5, 25, 250, 25)
GUISetState() ; 显示有两个按钮的窗口
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button1
_IniWrite("Rainmeter.ini", "Rainmeter", "SkinPath", @ScriptDir & "\Skins\", 1);覆盖
MsgBox(0, 0, 'OK!')
EndSelect
WEnd
Func _IniWrite($sIniFile, $Config, $sPath, $IniPath, $Flag = 0)
If $Flag = 1 Then FileDelete(@ScriptDir & '\' & $sIniFile)
IniWrite($sIniFile, $Config, $sPath, $IniPath)
$lujin = IniRead($sIniFile, $Config, $sPath, ''); 读取ini文件SkinPath=的值.
GUICtrlSetData($Input, $lujin); $Input上显示当前皮肤路径($lujin)
EndFunc ;==>_IniWrite
|