啊,我用最笨的方法多加了几行,怎么有错误啊。
只能从最后先拖放,其次2和1处,能不能打乱顺序都可以啊。还有就是打开后,不执行拖放 直接退出程序,那配置文件里原先的信息就会被清空的,这个怎么解决好呢?
#include <GUIConstantsEx.au3>
Example()
Func Example()
Local $file, $btn, $msg
GUICreate(" My", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018)
$file = GUICtrlCreateInput("", 10, 5, 300, 20)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
$file2 = GUICtrlCreateInput("", 10, 40, 300, 20)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
$file3 = GUICtrlCreateInput("", 10, 75, 300, 20)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUISetState()
$msg = 0
While 1
$msg = GUIGetMsg()
Select
Case $msg = $file
ExitLoop
Case $msg =$GUI_EVENT_CLOSE
$tmp=GUICtrlRead($file)
$tmp2=GUICtrlRead($file2)
$tmp3=GUICtrlRead($file3)
IniWrite("aa.ini","sect","a1",$tmp)
IniWrite("aa.ini","sect","a2",StringLeft($tmp,StringInStr($tmp,'\',0,-1)))
IniWrite("aa.ini","sect","a3",$tmp2)
IniWrite("aa.ini","sect","a4",StringLeft($tmp2,StringInStr($tmp2,'\',0,-1)))
IniWrite("aa.ini","sect","a5",$tmp3)
IniWrite("aa.ini","sect","a6",StringLeft($tmp3,StringInStr($tmp3,'\',0,-1)))
GUIDelete()
Exit
EndSelect
WEnd
EndFunc
|