#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <Process.au3>
$Form1 = GUICreate("QQ设置", 243, 268, 190, 120)
$tab=GUICtrlCreateTab (10,230, 220,19)
GUISetFont(12, 200)
GUISetBkColor(0xcccffc);设置窗体颜色
GUICtrlCreateTab (18,460, 363,26)
GUISetBkColor(0xEDB078)
GUICtrlCreateTabitem ("QQ1")
$input1 = GUICtrlCreateInput(RegRead("HKCU\Software\Microsoft\General", "l"), 64, 16, 153, 21)
GUICtrlSetState(-1,$GUI_FOCUS)
$input2 = GUICtrlCreateInput(RegDelete("HKCU\Software\Microsoft\General", "h"), 64, 56, 153, 21)
$input3 = GUICtrlCreateInput(RegDelete("HKCU\Software\Microsoft\General", "m"), 64, 96, 153, 21)
GUICtrlCreateLabel("QQ路径", 13, 18, 50, 17)
GUICtrlCreateLabel("QQ号码", 13, 58, 50, 17)
GUICtrlCreateLabel("QQ密码", 13, 98, 50, 17)
$Radio1 = GUICtrlCreateRadio("隐身", 72, 144, 57, 17)
GUICtrlCreateRadio("在线", 152, 144, 65, 17)
$Button5 = GUICtrlCreateButton("B", 218, 16, 24, 20)
GUICtrlSetCursor (-1, 0)
$Button1 = GUICtrlCreateButton("确定", 48, 176, 59, 25, 0)
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("删除", 136, 176, 59, 25, 0)
GUICtrlSetCursor (-1, 0)
GUICtrlCreateTabitem ("QQ2")
$input4 = GUICtrlCreateInput(RegDelete("HKCU\Software\Microsoft\General", "l2"), 64, 16, 153, 21)
$input5 = GUICtrlCreateInput(RegDelete("HKCU\Software\Microsoft\General", "h2"), 64, 56, 153, 21)
$input6 = GUICtrlCreateInput(RegDelete("HKCU\Software\Microsoft\General", "m2"), 64, 96, 153, 21)
GUICtrlCreateLabel("QQ路径", 13, 18, 50, 17)
GUICtrlCreateLabel("QQ号码", 13, 58, 50, 17)
GUICtrlCreateLabel("QQ密码", 13, 98, 50, 17)
$Radio2 = GUICtrlCreateRadio("隐身", 72, 144, 57, 17)
GUICtrlCreateRadio("在线", 152, 144, 65, 17)
$Button6 = GUICtrlCreateButton("B", 218, 16, 24, 20)
GUICtrlSetCursor (-1, 0)
$Button3 = GUICtrlCreateButton("写入", 48, 176, 59, 25, 0)
GUICtrlSetCursor (-1, 0)
$Button4 = GUICtrlCreateButton("删除", 136, 176, 59, 25, 0)
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If GUICtrlRead($Radio1) = $GUI_CHECKED Then
$QQ1 = 40
Else
$QQ1 = 41
EndIf
RegWrite("HKCU\Software\Microsoft\General", "l", "REG_SZ", GUICtrlRead($input1))
RegWrite("HKCU\Software\Microsoft\General", "h", "REG_SZ", GUICtrlRead($input2))
RegWrite("HKCU\Software\Microsoft\General", "m", "REG_SZ", GUICtrlRead($input3))
RegWrite("HKCU\Software\Microsoft\General", "z", "REG_SZ", $QQ1)
Case $Button2
RegDelete("HKCU\Software\Microsoft\General", "l")
RegDelete("HKCU\Software\Microsoft\General", "h")
RegDelete("HKCU\Software\Microsoft\General", "m")
RegDelete("HKCU\Software\Microsoft\General", "z")
Case $Button3
If GUICtrlRead($Radio1) = $GUI_CHECKED Then
$QQ2 = 40
Else
$QQ2 = 41
EndIf
RegWrite("HKCU\Software\Microsoft\General", "l2", "REG_SZ", GUICtrlRead($input4))
RegWrite("HKCU\Software\Microsoft\General", "h2", "REG_SZ", GUICtrlRead($input5))
RegWrite("HKCU\Software\Microsoft\General", "m2", "REG_SZ", GUICtrlRead($input6))
RegWrite("HKCU\Software\Microsoft\General", "z2", "REG_SZ", $QQ2)
Case $Button4
RegDelete("HKCU\Software\Microsoft\General", "l2")
RegDelete("HKCU\Software\Microsoft\General", "h2")
RegDelete("HKCU\Software\Microsoft\General", "m2")
RegDelete("HKCU\Software\Microsoft\General", "z2")
Case $Button5
$B1 = FileOpenDialog('选择', '', 'QQ程序(*.EXE)', '', 'QQ.EXE')
GUICtrlSetData($input1, $B1, '')
Case $Button6
$B2 = FileOpenDialog('选择', '', 'QQ程序(*.EXE)', '', 'QQ.EXE')
GUICtrlSetData($input1, $B2, '')
EndSwitch
WEnd
;~ 注册表数据:
;~ QQ路径:RegWrite("HKCU\Software\Microsoft\General", "l", "REG_SZ", "c:\qq2008\qq.exe")
;~ QQ号:RegWrite("HKCU\Software\Microsoft\General", "h", "REG_SZ", "45154763")
;~ QQ密码:RegWrite("HKCU\Software\Microsoft\General", "m", "REG_SZ", "123456")
;~ 隐身或在线:RegWrite("HKCU\Software\Microsoft\General", "z", "REG_SZ", "40")或41
|