文件操作!!
要从特殊的配置文件中读取信息.配置文件格式如下:
- Assembly code
"1" { "name" "【豆客CS平台】川A028 彭州战将网吧内伙子主场" "gamedir" "cstrike" "Players" "20" "maxplayers" "22" "map" "de_cpl_mill" "address" "222.209.211.148:27016" "lastplayed" "0" }
怎么弄?
怎么把配置文件中的名称和IP等东西提取出来?
[解决办法]
FileSystemObject对象
[解决办法]
Split函数
[解决办法]
逐行读取文件
do while not eof(1)
line input #1,s
if instr(1,s,"address") then 字符串截取 从右往左查双引号位置 用mid "222.209.211.148:27016"
loop
或逐行读取
每一行中如下操作
{
按双引号split 取出想要的那两部分
}