按键精灵手机端代码通

Dim screenX,screenY
screenX = GetScreenX()
screenY = GetScreenY()
PutAttachment "/mnt/shell/emulated/0/Others", "*.txt"
Import "File.lua" //******文本插件不能删除****
Dim 总行数,行数,结果,b,c,i=4
总行数 = File.linesnumber("/mnt/shell/emulated/0/Others/2.txt") //读取该文本文件的行数
TracePrint 总行数

//Randomize
//结果 = Int(((总行数-2+1) * Rnd()) + 1)
//Traceprint 结果

Do Until i>总行数
i=i+1
TracePrint i

b=File.ReadLine("/mnt/shell/emulated/0/Others/2.txt", i)
TracePrint b
c=File.ReadLine("/mnt/shell/emulated/0/Others/3.txt", i)
TracePrint c


//////////////退出登录
Tap 600, 1236 //点击坐标 我的
Delay 3000
Tap 360,114
Delay 3000
Tap 360, 624
Delay 3000
Tap 255, 689
Delay 3000 //这里完成退出


//////////////登录
Tap 600, 1236 //点击坐标 我的
Delay 3000
Tap 285, 144
Delay 10000
Tap 444, 444
Delay 1000
InputText b //这里输入账号
Delay 500
Tap 444, 500
Delay 100
InputText c //这里输入密码
Delay 1000
KeyPress "Enter"
Delay 5000


For 7

Tap 100, 1236
Delay 1000

//向左滑动屏幕
Swipe screenX / 2, screenY / 2, screenX / 9, screenY / 2
Delay 1000
Swipe screenX / 2, screenY / 2, screenX / 9, screenY / 2
Delay 1000
Swipe screenX / 2, screenY / 2, screenX / 9, screenY / 2
Delay 1000
Swipe screenX / 2, screenY / 2, screenX / 9, screenY / 2
Delay 1000

//向上滑动屏幕
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 3000

Tap 333, 555
Delay 3000

//向上滑动屏幕
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500
Swipe screenX / 2, screenY / 2, screenX / 2, screenY / 9
Delay 500

/*
/////////////////评论
Tap 373, 1240
Delay 1000
InputText "1" //这里输入评论内容
Delay 200
Tap 650, 1250
Delay 3000
*/

////////分享
Tap 677, 1250
Delay 3000
Tap 185, 885
Delay 1000
InputText "1" //这里输入评论内容
Delay 200
Tap 170, 1000
Delay 200
Tap 675, 85
Delay 3000


KeyPress "Back"
Delay 3000
KeyPress "Back"
Delay 3000
Next
Delay 5000
KeyPress "Back"
Loop
Delay 50000

 

 

 

 

 

 

 

 


//////////////登录
Tap 600, 1236 //点击坐标 我的
Delay 1000
Tap 285, 144
Delay 2000
Tap 444, 420
Delay 100
InputText "m.anjian.com" //这里输入账号
Delay 2000
Tap 444, 500
Delay 100
InputText "大法师的" //这里输入密码
Delay 1000
KeyPress "Enter"
Delay 10000

//////////////退出登录
Tap 600, 1236 //点击坐标 我的
Delay 1000
Tap 360,114
Delay 1000
Tap 360, 624
Delay 1000
Tap 255, 689
Delay 1000 //这里完成退出

 

 

 

 


Call 信息提示("")
Delay 1000

Tap 600, 1236
Delay 100
Touch screenX / 2, screenY + 50, 1000

Delay 100
//--------------------------------------------------------------------------------------------
Call 信息提示("自动滑动演示")
Swipe screenX/2, screenY/2, 0, screenY/2
Delay 500
Swipe screenX/2, screenY/2, screenX, screenY/2
Delay 500
Swipe screenX/2, 1, screenX/2, screenY
Delay 500

//--------------------------------------------------------------------------------------------
Call 信息提示("按下HOME键")
KeyPress "Home"
Delay 2000

//--------------------------------------------------------------------------------------------
Call 信息提示("震两秒试试?")
Vibrate 2000
Delay 1000

//--------------------------------------------------------------------------------------------

//--------------------------------------------------------------------------------------------
Call 信息提示("试试看拨打电话")
Phone.Dial (10086) //不会拨打,只是输入电话号码(拨打:Phone.DialOut 10086)
Delay 1500
KeyPress "home"
Delay 1000

//--------------------------------------------------------------------------------------------
InputText "11"


//--------------------------------------------------------------------------------------------
Call 信息提示("最后去按键移动版官网看看吧~")
Delay 1000
RunApp "com.android.quicksearchbox"
Delay 2000
InputText "m.anjian.com"
Delay 100
KeyPress "Enter"
Delay 2000

//--------------------------------------------------------------------------------------------
Sub 信息提示(内容)
TracePrint 内容
ShowMessage 内容
Delay 1500
End Sub

按键精灵手机端代码通

上一篇:uni-app引入自定义图标库


下一篇:uni-app之tabBar的自己配置