python实现adb辅助点击屏幕工具

这篇具有很好参考价值的文章主要介绍了python实现adb辅助点击屏幕工具。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import re
import os
import time
import subprocess
import tkinter as tk
from tkinter import messagebox
from PIL import Image, ImageTk

# 设置ADB路径(根据你的系统和安装路径进行调整)
ADB_PATH = 'C:/Users/DHY-20210315/AppData/Local/Android/Sdk/platform-tools/adb.exe'
# 设置截屏图片显示比例
scl = 0.7

# 创建一个GUI窗口
root = tk.Tk()
root.title("ADB辅助点击助手")
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
# 设置窗口大小
window_width = 900
window_height = 600
x = (screen_width - window_width) // 2
y = (screen_height - window_height) // 2
root.geometry(f"{window_width}x{window_height}+{x}+{y}")


# 函数:通过ADB截屏并显示
def capture_and_display():
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    # file = str(round(time.time() * 1000)) + '.png'
    file = 'screencap.png'
    scp = '/sdcard/Pictures/' + file
    capture_process = subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'screencap', scp])
    capture_process.wait()

    lsc = './' + file
    pull_process = subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'pull', scp, lsc])
    pull_process.wait()

    screenshot = Image.open(lsc)
    width, height = screenshot.size
    new_width = int(width * scl)
    new_height = int(height * scl)
    screenshot = screenshot.resize((new_width, new_height), Image.ANTIALIAS)
    s_w = new_width + 20
    s_h = new_height + 50
    root.geometry(f"{s_w}x{s_h}+{(screen_width - s_w) // 2}+{(screen_height - s_h) // 2}")

    img = ImageTk.PhotoImage(screenshot)
    img_label.config(image=img)
    img_label.image = img


# 函数:通过ADB点击图片
def click_img(event):
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    if ck_var.get() == 1:
        for i in range(8):
            subprocess.Popen(
                [ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'tap', str(event.x / scl), str(event.y / scl)])
            time.sleep(0.01)
        ck_var.set(0)
    else:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'tap', str(event.x / scl), str(event.y / scl)])
    time.sleep(1)
    capture_and_display()


# 函数:通过ADB发送按键
def send_back_command():
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'keyevent', '4'])
    time.sleep(1)
    capture_and_display()


# 函数:通过ADB发送滑动
def send_slide_command(arg):
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    if arg == 1:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'swipe', '969 1050 969 800 100'])
        time.sleep(1)
        capture_and_display()
    else:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'swipe', '969 800 969 1050 100'])
        time.sleep(1)
        capture_and_display()


# 函数:通过ADB获取设备名
def find_device():
    dvs = os.popen("adb devices").readlines()
    dfs = ''
    for ss in dvs:
        ss = ss.strip('\n')
        if 'List of devices' not in ss and len(ss) > 6 and 'offline' not in ss:
            dv = ss.split('\t')[0]
            p = subprocess.Popen("adb -s %s shell getprop ro.product.model" % dv, stdout=subprocess.PIPE)
            result = p.communicate()
            dn = result[0].decode('utf-8').strip()
            cold_bev = tk.Radiobutton(button_frame, text=dn, variable=r_var, value=dv)
            cold_bev.pack(side="left")
            if dfs == '':
                dfs = dv
    if dfs != '':
        r_var.set(dfs)


def find_ip(input_string):
    ip_pattern = r'\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b'
    ip_addresses = re.findall(ip_pattern, input_string)
    return ip_addresses[0]


# 函数:通过ADB wifi连接设备
def wifi_connect():
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    dv = r_var.get()
    if r_var.get().startswith('192.168.'):
        messagebox.showinfo(title='提示', message='已经是WiFi连接了啊!')
        return
    p = subprocess.Popen("adb -s %s shell ip -f inet addr show wlan0" % dv, stdout=subprocess.PIPE)
    result = p.communicate()
    dn = result[0].decode('utf-8').strip()
    ip = find_ip(dn)
    subprocess.Popen([ADB_PATH, 'connect', ip])


button_frame = tk.Frame(root)
button_frame.pack()

capture_button = tk.Button(button_frame, text="截屏", command=capture_and_display)
capture_button.pack(side="left")
tk.Label(button_frame, text="   ").pack(side="left")
back_button = tk.Button(button_frame, text="后退", command=send_back_command)
back_button.pack(side="left")
tk.Label(button_frame, text="   ").pack(side="left")
up_button = tk.Button(button_frame, text="上滑", command=lambda: send_slide_command(1))
up_button.pack(side="left")
tk.Label(button_frame, text="   ").pack(side="left")
down_button = tk.Button(button_frame, text="下滑", command=lambda: send_slide_command(0))
down_button.pack(side="left")
tk.Label(button_frame, text="   ").pack(side="left")
ck_var = tk.IntVar()
c1 = tk.Checkbutton(button_frame, text='8连击', variable=ck_var, onvalue=1, offvalue=0)
c1.pack(side="left")
tk.Label(button_frame, text="   ").pack(side="left")
r_var = tk.StringVar(value='')
find_device()
img_label = tk.Label(root)
img_label.pack()
img_label.bind('<Button-1>', click_img)
wifi_button = tk.Button(button_frame, text="WiFi连接", command=wifi_connect)
wifi_button.pack(side="left")

root.mainloop()

python实现adb辅助点击屏幕工具,python3,java原创,python,adb,开发语言,屏幕点击

version 1.2:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import re
import os
import time
import subprocess
import tkinter as tk
from tkinter import messagebox
from PIL import Image, ImageTk

# 设置ADB路径(根据你的系统和安装路径进行调整)
ADB_PATH = 'C:/Users/DHY-20210315/AppData/Local/Android/Sdk/platform-tools/adb.exe'
# 设置截屏图片显示比例
scl = 0.7

# 创建一个GUI窗口
root = tk.Tk()
root.title("ADB辅助点击助手")
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
# 设置窗口大小
window_width = 900
window_height = 600
x = (screen_width - window_width) // 2
y = (screen_height - window_height) // 2
root.geometry(f"{window_width}x{window_height}+{x}+{y}")


# 函数:通过ADB截屏并显示
def capture_and_display():
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    # file = str(round(time.time() * 1000)) + '.png'
    file = 'screencap.png'
    scp = '/sdcard/Pictures/' + file
    capture_process = subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'screencap', scp])
    capture_process.wait()

    lsc = './' + file
    pull_process = subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'pull', scp, lsc])
    pull_process.wait()

    screenshot = Image.open(lsc)
    width, height = screenshot.size
    new_width = int(width * scl)
    new_height = int(height * scl)
    screenshot = screenshot.resize((new_width, new_height), Image.ANTIALIAS)
    s_w = new_width + 20
    s_h = new_height + 50
    root.geometry(f"{s_w}x{s_h}+{(screen_width - s_w) // 2}+{(screen_height - s_h) // 2}")

    img = ImageTk.PhotoImage(screenshot)
    img_label.config(image=img)
    img_label.image = img


# 函数:通过ADB点击图片
def click_img(event):
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    if ck_var.get() == 1:
        for i in range(8):
            subprocess.Popen(
                [ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'tap', str(event.x / scl), str(event.y / scl)])
            time.sleep(0.01)
        ck_var.set(0)
    else:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'tap', str(event.x / scl), str(event.y / scl)])
    time.sleep(1)
    capture_and_display()


# 函数:通过ADB发送按键
def send_back_command():
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'keyevent', '4'])
    time.sleep(1)
    capture_and_display()


# 函数:通过ADB发送滑动
def send_slide_command(arg):
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    if arg == 1:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'swipe', '969 1000 969 800 100'])
        time.sleep(1)
        capture_and_display()
    else:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'swipe', '969 800 969 1000 100'])
        time.sleep(1)
        capture_and_display()


# 函数:通过ADB获取设备名
def find_device():
    for widget in devices_frame.winfo_children():
        widget.destroy()
    dvs = os.popen("adb devices").readlines()
    dfs = ''
    for ss in dvs:
        ss = ss.strip('\n')
        if 'List of devices' not in ss and len(ss) > 6 and 'offline' not in ss:
            dv = ss.split('\t')[0]
            p = subprocess.Popen("adb -s %s shell getprop ro.product.model" % dv, stdout=subprocess.PIPE)
            result = p.communicate()
            dn = result[0].decode('utf-8').strip()
            cold_bev = tk.Radiobutton(devices_frame, text=dn, variable=r_var, value=dv)
            cold_bev.pack(side="left")
            if dfs == '':
                dfs = dv
    if dfs != '':
        r_var.set(dfs)
    else:
        r_var.set('')


def find_ip(input_string):
    ip_pattern = r'\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b'
    ip_addresses = re.findall(ip_pattern, input_string)
    return ip_addresses[0]


# 函数:通过ADB wifi连接设备
def wifi_connect():
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    dv = r_var.get()
    if r_var.get().startswith('192.168.'):
        messagebox.showinfo(title='提示', message='已经是WiFi连接了啊!')
        return
    p = subprocess.Popen("adb -s %s shell ip -f inet addr show wlan0" % dv, stdout=subprocess.PIPE)
    result = p.communicate()
    dn = result[0].decode('utf-8').strip()
    ip = find_ip(dn)
    subprocess.Popen([ADB_PATH, 'connect', ip])


button_frame = tk.Frame(root)
button_frame.pack()

capture_button = tk.Button(button_frame, text="刷新截屏", command=capture_and_display)
capture_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
back_button = tk.Button(button_frame, text="后退", command=send_back_command)
back_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
up_button = tk.Button(button_frame, text="上滑", command=lambda: send_slide_command(1))
up_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
down_button = tk.Button(button_frame, text="下滑", command=lambda: send_slide_command(0))
down_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
ck_var = tk.IntVar()
c1 = tk.Checkbutton(button_frame, text='8连击', variable=ck_var, onvalue=1, offvalue=0)
c1.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
r_var = tk.StringVar(value='')
devices_frame = tk.Frame(button_frame)
devices_frame.pack(side="left")
find_device()
img_label = tk.Label(root)
img_label.pack()
img_label.bind('<Button-1>', click_img)
wifi_button = tk.Button(button_frame, text="WiFi连接", command=wifi_connect)
wifi_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
wifi_button = tk.Button(button_frame, text="获取设备", command=find_device)
wifi_button.pack(side="left")

root.mainloop()

version 1.3:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# version v1.3

import re
import os
import time
import subprocess
import tkinter as tk
from tkinter import messagebox
from PIL import Image, ImageTk

# 设置ADB路径(根据你的系统和安装路径进行调整)
ADB_PATH = 'C:/Users/DHY-20210315/AppData/Local/Android/Sdk/platform-tools/adb.exe'
# 设置截屏图片显示比例
scl = 0.7

# 创建一个GUI窗口
root = tk.Tk()
root.title("ADB辅助点击助手")
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
# 设置窗口大小
window_width = 900
window_height = 600
x = (screen_width - window_width) // 2
y = (screen_height - window_height) // 2
root.geometry(f"{window_width}x{window_height}+{x}+{y}")


# 函数:通过ADB截屏并显示
def capture_and_display():
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    # file = str(round(time.time() * 1000)) + '.png'
    file = 'screencap.png'
    scp = '/sdcard/Pictures/' + file
    capture_process = subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'screencap', scp])
    capture_process.wait()

    lsc = './' + file
    pull_process = subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'pull', scp, lsc])
    pull_process.wait()

    screenshot = Image.open(lsc)
    width, height = screenshot.size
    new_width = int(width * scl)
    new_height = int(height * scl)
    screenshot = screenshot.resize((new_width, new_height), Image.ANTIALIAS)
    s_w = new_width + 20
    s_h = new_height + 50
    root.geometry(f"{s_w}x{s_h}+{(screen_width - s_w) // 2}+{(screen_height - s_h) // 2}")

    img = ImageTk.PhotoImage(screenshot)
    img_label.config(image=img)
    img_label.image = img


# 函数:通过ADB点击图片
def click_img(event):
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    if ck_var.get() == 1:
        for i in range(8):
            subprocess.Popen(
                [ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'tap', str(event.x / scl), str(event.y / scl)])
            time.sleep(0.2)
        ck_var.set(0)
    else:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'tap', str(event.x / scl), str(event.y / scl)])
    time.sleep(1)
    capture_and_display()


# 函数:通过ADB发送按键
def send_back_command():
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'keyevent', '4'])
    time.sleep(1)
    capture_and_display()


# 函数:通过ADB发送滑动
def send_slide_command(arg):
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    if arg == 1:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'touchscreen', 'swipe', '969 800 969 300 100'])
        time.sleep(1)
        capture_and_display()
    elif arg == 2:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'touchscreen', 'swipe', '1920 500 1620 500 1920 800 1620 800 100'])
        time.sleep(1)
        capture_and_display()
    elif arg == 3:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'keyevent', '26'])
        time.sleep(1)
        capture_and_display()
    elif arg == 4:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'reboot', '-p'])
        time.sleep(1)
        capture_and_display()
    elif arg == 5:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'touchscreen', 'swipe', '1300 500 300 500 100'])
        time.sleep(1)
        capture_and_display()
    elif arg == 6:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'touchscreen', 'swipe', '300 500 1300 500 100'])
        time.sleep(1)
        capture_and_display()
    else:
        subprocess.Popen([ADB_PATH, '-s', r_var.get(), 'shell', 'input', 'touchscreen', 'swipe', '969 300 969 800 100'])
        time.sleep(1)
        capture_and_display()


# 函数:通过ADB获取设备名
def find_device(aa=0):
    for widget in devices_frame.winfo_children():
        widget.destroy()
    dvs = os.popen("adb devices").readlines()
    dfs = ''
    for ss in dvs:
        ss = ss.strip('\n')
        if 'List of devices' not in ss and len(ss) > 6 and 'offline' not in ss:
            dv = ss.split('\t')[0]
            p = subprocess.Popen("adb -s %s shell getprop ro.product.model" % dv, stdout=subprocess.PIPE)
            result = p.communicate()
            dn = result[0].decode('utf-8').strip()
            cold_bev = tk.Radiobutton(devices_frame, text=dn, variable=r_var, value=dv)
            cold_bev.pack(side="left")
            if dfs == '':
                dfs = dv
    if dfs != '':
        r_var.set(dfs)
    else:
        r_var.set('')
        if aa == 0:
            messagebox.showinfo(title='提示', message='没有连接设备呀!')


def find_ip(input_string):
    ip_pattern = r'\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b'
    ip_addresses = re.findall(ip_pattern, input_string)
    return ip_addresses[0]


# 函数:通过ADB wifi连接设备
def wifi_connect():
    if r_var.get() == '':
        messagebox.showinfo(title='提示', message='没有连接设备呀!')
        return
    dv = r_var.get()
    if r_var.get().startswith('192.168.'):
        messagebox.showinfo(title='提示', message='已经是WiFi连接了啊!')
        return
    p = subprocess.Popen("adb -s %s shell ip -f inet addr show wlan0" % dv, stdout=subprocess.PIPE)
    result = p.communicate()
    dn = result[0].decode('utf-8').strip()
    ip = find_ip(dn)
    subprocess.Popen([ADB_PATH, 'connect', ip])


button_frame = tk.Frame(root)
button_frame.pack()

capture_button = tk.Button(button_frame, text="刷新截屏", command=capture_and_display)
capture_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
back_button = tk.Button(button_frame, text="后退", command=send_back_command)
back_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
up_button = tk.Button(button_frame, text="上滑", command=lambda: send_slide_command(1))
up_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
down_button = tk.Button(button_frame, text="下滑", command=lambda: send_slide_command(0))
down_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
up_button = tk.Button(button_frame, text="左滑", command=lambda: send_slide_command(5))
up_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
down_button = tk.Button(button_frame, text="右滑", command=lambda: send_slide_command(6))
down_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
#down_button = tk.Button(button_frame, text="分屏", command=lambda: send_slide_command(2))
#down_button.pack(side="left")
#tk.Label(button_frame, text=" ").pack(side="left")
down_button = tk.Button(button_frame, text="点亮", command=lambda: send_slide_command(3))
down_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
down_button = tk.Button(button_frame, text="关机", command=lambda: send_slide_command(4))
down_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
ck_var = tk.IntVar()
c1 = tk.Checkbutton(button_frame, text='8连击', variable=ck_var, onvalue=1, offvalue=0)
c1.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
r_var = tk.StringVar(value='')
devices_frame = tk.Frame(button_frame)
devices_frame.pack(side="left")
find_device(1)
img_label = tk.Label(root)
img_label.pack()
img_label.bind('<Button-1>', click_img)
wifi_button = tk.Button(button_frame, text="WiFi连接", command=wifi_connect)
wifi_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")
wifi_button = tk.Button(button_frame, text="获取设备", command=find_device)
wifi_button.pack(side="left")
tk.Label(button_frame, text=" ").pack(side="left")

root.mainloop()

python实现adb辅助点击屏幕工具,python3,java原创,python,adb,开发语言,屏幕点击文章来源地址https://www.toymoban.com/news/detail-704832.html

到了这里,关于python实现adb辅助点击屏幕工具的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • 【经典算法】 leetcode88.合并排序的数组(Java/C/Python3实现含注释说明,Easy)

    作者主页: 🔗进朱者赤的博客 精选专栏:🔗经典算法 作者简介:阿里非典型程序员一枚 ,记录在大厂的打怪升级之路。 一起学习Java、大数据、数据结构算法( 公众号同名 ) ❤️觉得文章还不错的话欢迎大家点赞👍➕收藏⭐️➕评论,💬支持博主,记得点个大大的 关

    2024年04月22日
    浏览(11)
  • 【iOS免越狱】利用IOS自动化web-driver-agent_appium-实现自动点击+滑动屏幕

    【iOS免越狱】利用IOS自动化web-driver-agent_appium-实现自动点击+滑动屏幕

    1.目标 在做饭、锻炼等无法腾出双手的场景中,想刷刷抖音 刷抖音的时候有太多的广告 如何解决痛点 抖音自动播放下一个视频  iOS系统高版本无法 越狱 安装插件 2.操作环境 MAC一台,安装 Xcode iPhone一台,16 系统以上最佳  3.流程 下载最新 web-driver-agent_appium xcode 打开  配置

    2024年02月08日
    浏览(12)
  • [1159]adb判断手机屏幕状态并点亮屏幕

    唤醒屏幕操作 解锁屏幕 关闭和开启屏幕样例 重新启动手机app 以上操作需要adb环境已经搭建好,使用以下命令查看连接设备 想获取某个APP名称用于启动时,手机先打开APP,然后执行以下命令 参考:https://www.cnblogs.com/Kirito-Asuna-Yoyi/p/Python-ADB1.html https://blog.csdn.net/weixin_40895135/

    2024年02月11日
    浏览(9)
  • 【ADB】借助ADB模拟滑动屏幕,并进行循环

    adb shell input的swipe指令格式: swipe x1 y1 x2 y2 time(以毫秒为单位) 进行循环 把上面adb shell指令复制到txt中,并重命名为.bat,手机连接电脑,打开USB调试,双击运行即可,就可以看到屏幕下滑,这里是循环10次

    2024年02月04日
    浏览(8)
  • android如何通过adb快速开启、关闭辅助副屏

    android如何通过adb快速开启、关闭辅助副屏

    adb 指令 效果

    2024年02月01日
    浏览(15)
  • Python3(二):开发工具 IDEA配置

    Python3(二):开发工具 IDEA配置

    因为一直使用IDEA进行Java开发,对IDEA相对熟悉,上手比较快,所以就选择了IDEA进行相关的Python脚本编写。当然也可以选择vsCode,PyCharm等工具。 本文主要介绍IDEA配置及如何创建Python项目。 选择本地安装的Python环境即可。 File - Project,选择Project SDK,一路Next,然后设置项目名

    2024年02月16日
    浏览(36)
  • adb控制手机屏幕滑动

    adb控制手机屏幕滑动

    前言: 这个用的是小米手机,在“开发者选项中”把 “USB调试”和**“USB调试(安全设置**)”两个都打开, 也可以把 指针位置 打开 来看触控点在屏幕的坐标: 2 adb 划动相册 其中 1.choice /t 1 /d y /n nul 的1 是1秒钟滑动一次 2.adb shell input swipe 350 1000 850 1000 200 350 1000 850 1000 2

    2024年02月13日
    浏览(8)
  • 知识图谱-命名实体-关系-免费标注工具-快速打标签-Python3

    知识图谱-命名实体-关系-免费标注工具-快速打标签-Python3

    你好! 这是一款实体关系联合标注的本地小程序,以 P y t h o n 3 Python3 P y t h o n 3 实现。本系统是一种标注文本语料中命名实体与关系或属性的半自动化软件系统,应用 P y t h o n Python P y t h o n 编程实现可视化界面和主要功能,利用 H T M L HTML H TM L 和 C S S CSS CSS 提示标注教程与

    2024年02月03日
    浏览(7)
  • 屏幕分辨率dpi解析(adb 调试查看)

    屏幕分辨率dpi解析(adb 调试查看)

    author daisy.skye的博客_CSDN博客-嵌入式,Qt,Linux领域博主 ro.sf.lcd_density属性指定了这个机型使用的dpi是多少,dpi全称是dots per inch,对角线每英寸的像素点的个数。 密度 ldpi mdpi hdpi xhdpi xxhdpi 分辨率 240x320 320x480 480x800 720x1280 1080x1920 系统dpi 120 160 240 320 480 基准比例 0.75 1 1.5 2 3 adb 查

    2024年02月03日
    浏览(8)
  • 为teamcity的代码语法检查工具pyflakes增加支持python2和python3

    为teamcity的代码语法检查工具pyflakes增加支持python2和python3

    TeamCity是一款由JetBrains公司开发的持续集成和部署工具,它提供了丰富的功能来帮助团队协作进行软件开发。其中包括代码检查、自动化构建、测试运行、版本控制等多个方面。 在我们团队中使用TeamCity进行配合pyflakes代码检查,我们需要升级pyflakes到支持python3,同时保留py

    2024年02月07日
    浏览(11)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包