admin 管理员组

文章数量: 1087135


2024年3月10日发(作者:按什么键停止电脑运行)

y2 = size[1] * 0.75

for i in range(n):

if not args:

("adb shell input swipe %f %f %f %f %d" % (x1, y1, x2, y2, t))

else:

uid = args[0]

("adb -s %s shell input swipe %f %f %f %f %d" % (uid, x1, y1, x2, y2, t))

def swipe_left(*args, t=100, n=1):

"""Swipe device screen left in t milliseconds and repeat the operation n times"""

size = get_screen_size(*args)

x1 = size[0] * 0.95

y1 = size[1] * 0.5

x2 = size[0] * 0.05

y2 = size[1] * 0.5

for i in range(n):

if not args:

("adb shell input swipe %f %f %f %f %d" % (x1, y1, x2, y2, t))

else:

uid = args[0]

("adb -s %s shell input swipe %f %f %f %f %d" % (uid, x1, y1, x2, y2, t))

def swipe_right(*args, t=100, n=1):

"""Swipe device screen right in t milliseconds and repeat the operation n times"""

size = get_screen_size(*args)

x1 = size[0] * 0.05

y1 = size[1] * 0.5

x2 = size[0] * 0.95

y2 = size[1] * 0.5

for i in range(n):

if not args:

("adb shell input swipe %f %f %f %f %d" % (x1, y1, x2, y2, t))

else:

uid = args[0]

("adb -s %s shell input swipe %f %f %f %f %d" % (uid, x1, y1, x2, y2, t))

def swipe_oblique(*args, t=100, n=1):

"""Swipe device screen oblique in t milliseconds and repeat the operation n times"""

size = get_screen_size(*args)

x1 = size[0] * 0.05

y1 = size[1] * 0.75

x2 = size[0] * 0.95

y2 = size[1] * 0.25

for i in range(n):

if not args:

("adb shell input swipe %f %f %f %f %d" % (x1, y1, x2, y2, t))

else:

uid = args[0]

("adb -s %s shell input swipe %f %f %f %f %d" % (uid, x1, y1, x2, y2, t))


本文标签: 运行 电脑 停止