shape1=1055991329
//手型鼠标代码
shape2=0
// I 型鼠标代码
set file=CreateObject("Scripting.FileSystemObject")
forwriting=2
forreading=1
Rem 判断登录文件是否存在
If file.FileExists("d:\修真登录文本.txt")=0
set file=CreateObject("Scripting.FileSystemObject")
//创建文本的位置
set myfile=file.createtextfile("d:\修真登录文本.txt")
Gosub 输入账号密码
Gosub 写文件
Else
VBSCall dm=InputBox("请输入代码: 1—表示新账号 0—表示老账号")
If StrComp("",dm)=0 or dm="0"
Goto end
Else
Gosub 输入账号密码
Gosub 写文件
EndIf
EndIf
Rem end
Rem 读取文件中的游戏账号和密码
If file.FileExists("d:\修真登录文本.txt")=0
Goto 判断登录文件是否存在
EndIf
Rem 打开网页并进行登录
VBSCall RunApp("http://xz.yyge.com")
//修真网游网址
Plugin ck = Window.Foreground()
Plugin Window.Max(ck)
Rem 检查登录
VBSCall FindPic(10,10,300,200,"Attachment:\01.bmp",0.9,intX,intY)
//判断网页打开标识
If intX<0 and intY<0
Goto 检查登录
EndIf
Delay 500
MoveTo 1015,147
LeftDown 1
MoveR 0,80
LeftUp 1
Delay 500
Gosub 读文件
Rem 开始登录
VBSCall FindPic(10,10,1000,750,"Attachment:\" & qh & ".bmp",0.9,intX,intY)
//根据开始输入的服务器号自动选择服务器
If intX<0 and intY<0
Goto 开始登录
EndIf
Rem 检查鼠标形状1
Delay 500
MoveTo intX+30,intY+10
VBSCall shape=GetCursorShape(0)
If shape=shape1
Delay 500
Else
MoveTo intX+31,intY+11
Goto 检查鼠标形状1
EndIf
LeftClick 1
Delay 1000
VBSCall FindPic(305,277,708,450,"Attachment:\登录按钮.bmp",0.9,X,Y)
If X<0 and Y<0
Goto 检查鼠标形状1
EndIf
Rem 输入账号
MoveTo 440,330
VBSCall shape=GetCursorShape(0)
If shape=shape2
LeftClick 1
Delay 300
var=zh
Gosub 输入字符串
Delay 300
KeyPress 9,1
var=mm
Gosub 输入字符串
Delay 800
KeyPress 13,1
Else
Goto 输入账号
EndIf
EndScript
//****************************
Sub 写文件
//写入文本的位置
set myfile=file.opentextfile("d:\修真登录文本.txt",forwriting)
//写文本的内容
myfile.writeline(qh)
myfile.writeline(zh)
myfile.writeline(mm)
myfile.Close
Return 写文件
Sub 读文件
set file=CreateObject("Scripting.FileSystemObject")
Set myfile=file.OpenTextFile("d:\修真登录文本.txt",ForReading)
qh=myfile.ReadLine