找回密码
 加入
搜索
查看: 3345|回复: 7

高手请进。帮助我写入配置文件。

[复制链接]
发表于 2008-6-21 06:05:34 | 显示全部楼层 |阅读模式

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <ProgressConstants.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=form4.kxf
$Form4 = GUICreate("网吧维护通道服务端", 401, 311, 316, 262)
GUISetIcon("D:\005.ico")
$PageControl1 = GUICtrlCreateTab(8, 8, 388, 296)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("基本设置")
$Group1 = GUICtrlCreateGroup("绑定网关", 19, 38, 177, 105)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
GUICtrlCreateInput("192.168.0.1", 80, 54, 105, 23)
$Label1 = GUICtrlCreateLabel("网关IP:", 28, 59, 48, 18)
GUICtrlCreateInput("00-00-0-00-00-00", 80, 83, 105, 23)
$Label2 = GUICtrlCreateLabel("MAC:", 38, 86, 39, 18)
$Button4 = GUICtrlCreateButton("开启", 29, 111, 43, 25, 0)
$Button5 = GUICtrlCreateButton("禁止", 84, 111, 43, 25, 0)
$Button6 = GUICtrlCreateButton("设置", 140, 111, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group7 = GUICtrlCreateGroup("禁止机器", 19, 143, 177, 49)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Input5 = GUICtrlCreateInput("Server|XJ58LM|MSER|CnnipMovie", 26, 161, 113, 23)
$Button19 = GUICtrlCreateButton("设置", 145, 161, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group6 = GUICtrlCreateGroup("屏蔽网址", 19, 192, 177, 49)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Button17 = GUICtrlCreateButton("开启", 45, 209, 43, 25, 0)
$Button18 = GUICtrlCreateButton("禁止", 125, 209, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("设置超时 1秒=1000", 19, 242, 177, 49)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Input2 = GUICtrlCreateInput("20000", 28, 261, 65, 23)
$Button10 = GUICtrlCreateButton("设置", 139, 260, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("设置背景 必须为BMP格式", 206, 39, 177, 81)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Input3 = GUICtrlCreateInput("1.bmp", 254, 57, 121, 23)
$Label4 = GUICtrlCreateLabel("名称:", 214, 61, 40, 18)
$Button11 = GUICtrlCreateButton("开启", 217, 86, 43, 25, 0)
$Button12 = GUICtrlCreateButton("禁止", 272, 86, 43, 25, 0)
$Button13 = GUICtrlCreateButton("设置", 326, 86, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("设置主页", 206, 121, 177, 89)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Input1 = GUICtrlCreateInput("Http://Www.Xj58Lm.Cn/", 254, 145, 121, 23)
$Label3 = GUICtrlCreateLabel("地址:", 214, 147, 40, 18)
$Button7 = GUICtrlCreateButton("开启", 219, 174, 43, 25, 0)
$Button8 = GUICtrlCreateButton("禁止", 273, 175, 43, 25, 0)
$Button9 = GUICtrlCreateButton("设置", 327, 175, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group5 = GUICtrlCreateGroup("同步时间", 206, 210, 177, 81)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Input4 = GUICtrlCreateInput("192.168.0.251", 254, 230, 121, 23)
$Label5 = GUICtrlCreateLabel("地址:", 214, 233, 40, 18)
$Button14 = GUICtrlCreateButton("开启", 218, 257, 43, 25, 0)
$Button15 = GUICtrlCreateButton("禁止", 273, 257, 43, 25, 0)
$Button16 = GUICtrlCreateButton("设置", 328, 258, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet2 = GUICtrlCreateTabItem("绑定ARP")
GUICtrlCreateGroup("扫描 MAC 地址", 17, 34, 370, 258)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
GUICtrlCreateLabel("从", 31, 54, 16, 18)
GUICtrlCreateLabel("到", 158, 54, 16, 18)
$Checkbox1 = GUICtrlCreateCheckbox("扫描(S)", 271, 50, 53, 20, BitOR($BS_CHECKBOX,$BS_AUTOCHECKBOX,$BS_PUSHLIKE,$WS_TABSTOP))
$Button20 = GUICtrlCreateButton("保存(Z)", 329, 49, 53, 20, 0)
$hListView = GUICtrlCreateListView("", 23, 76, 358, 158)
GUICtrlSendMsg(-1, 0x101E, 0, 50)
$hProgress = GUICtrlCreateProgress(25, 240, 354, 18)
$Button21 = GUICtrlCreateButton("开启", 205, 263, 43, 25, 0)
$Button28 = GUICtrlCreateButton("禁止", 267, 263, 43, 25, 0)
$Button29 = GUICtrlCreateButton("设置", 327, 263, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet3 = GUICtrlCreateTabItem("禁止运行")
$Group8 = GUICtrlCreateGroup("禁止运行", 16, 40, 369, 257)
GUICtrlSetFont(-1, 9, 400, 0, "Arial")
$Edit2 = GUICtrlCreateEdit("", 24, 56, 353, 201)
GUICtrlSetData(-1, StringFormat("cmd2.exe|cmd1.exe|LOGO_1.EXE|LOGO_2.EXE|igw.exe|iga.exe|img.exe|vml.exe|QQlive.exe|conime0.exe|IceSword.exe|Thunder.exe|Thunder5.exe|PP.exe|Poco2007.exe|Poco2006.exe|Poco2005.exe|Poco2004.exe|eMule.exe|Vagaa.exe|down.exe|0.exe|1.exe|2.exe|3.exe|4.exe|5.exe|6.exe|7.exe|8.exe|9.exe|10.exe|11.exe|12.exe|13.exe|14.exe|15.exe|f0.exe|f1.exe|f2.exe|f3.exe|f4.exe|f5.exe|f6.exe|f7.exe|f8.exe|f9.exe|f10.exe|f11.exe|f12.exe|f13.exe|f14.exe|f15.exe|wm0.exe|wm1.exe|wm2.exe|wm3.exe|wm4.exe|wm5.exe|wm6.exe|wm7.exe|wm8.exe|wm9.exe|wm10.exe|wm11.exe|wm12.exe|wm13.exe|wm14.exe|wm15.exe|3721.exe|cmd32.exe|cmddcs.exe|cdnns.exe|comime.exe|c0mime.exe|ddos.exe|hkcmd.exe|ieup.exe|hosts.exe|vip.exe|upxdnd.exe|vfp01.exe|vfp02.exe|systemm.exe|systems.exe|systemt.exe|sxs.exe|svshost.exe|sound.exe|spoolvs.exe|woso.exe|smsss.exe|rep.exe|qjso.exe|qpw.exe|psdmt.exe|ps80.exe|rev.exe|mso.exe|msjava.exe|network.exe|mhso.exe|logo1.exe|_logo_1.exe|_logo1.exe|_logo1_.exe|_logo_1.exe|logo_1.exe|logo1_.exe|front.exe|1explore.exe|iexpl0re.exe|iexplo\r\nrs.exe|iexp1ore.exe"))
$Button22 = GUICtrlCreateButton("开启", 223, 264, 43, 25, 0)
$Button23 = GUICtrlCreateButton("禁止", 275, 264, 43, 25, 0)
$Button24 = GUICtrlCreateButton("设置", 326, 264, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet4 = GUICtrlCreateTabItem("网吧公告")
$Group9 = GUICtrlCreateGroup("开机公告", 17, 40, 369, 257)
$Edit3 = GUICtrlCreateEdit("", 25, 56, 353, 201)
GUICtrlSetData(-1, "本网吧收费:@LF        会员卡:1.5元/小时@LF        临时卡:2元/小时@LF        夜场卡:6元/23:00-09:00@LF    请小心保管自己的贵重物品,不要把手机放在台面上,提防小偷!请自行保管自己的各种虚拟帐号,如有丢失网吧概不负责!")
$Button25 = GUICtrlCreateButton("开启", 224, 264, 43, 25, 0)
$Button26 = GUICtrlCreateButton("禁止", 276, 264, 43, 25, 0)
$Button27 = GUICtrlCreateButton("设置", 327, 264, 43, 25, 0)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet5 = GUICtrlCreateTabItem("关于")
$Group10 = GUICtrlCreateGroup("关于", 17, 37, 369, 257)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $PageControl1
EndSwitch
WEnd


能不能帮助我写下这个东西,感谢了。

[ 本帖最后由 cj4025 于 2008-6-25 01:18 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2008-6-22 00:33:29 | 显示全部楼层
怎么没有人帮忙啊。哎,高手都到那去了
发表于 2008-6-22 02:31:25 | 显示全部楼层
已经能写C/S了, 我是只能看看了
发表于 2008-6-22 11:07:46 | 显示全部楼层
一个空壳!呵呵~慢慢写!很容易的!
 楼主| 发表于 2008-6-23 22:01:24 | 显示全部楼层
大哥呀。不会呀。教一下啊。我实在没折了,给帮个忙呀!
 楼主| 发表于 2008-6-24 00:32:15 | 显示全部楼层
经过努力终于完成地一页面的设置
下面贴上部分源码给大家参考


case $Button6
$IP=GUICtrlRead($Input10)
$MAC=GUICtrlRead($Input11)
IniWrite("SerVer.ini", "绑定网关","网关IP", $ip)
IniWrite("SerVer.ini", "绑定网关","网关MAC", $MAC)
msgbox(64,"提示","设置成功")
case $button4
IniWrite("SerVer.ini", "绑定网关", "是否运行", "1")
msgbox(64,"提示","设置成功")
case $button5
IniWrite("SerVer.ini", "绑定网关", "是否运行", "0")
msgbox(64,"提示","设置成功")

 楼主| 发表于 2008-6-24 00:33:37 | 显示全部楼层
还有就怎么读取配置文件中的数据?
 楼主| 发表于 2008-6-25 01:19:05 | 显示全部楼层
我自己,已经解决问题。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-23 18:16 , Processed in 0.074746 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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