您现在的位置是:主页 > news > wordpress扫码支付宝/关键词排名优化软件价格
wordpress扫码支付宝/关键词排名优化软件价格
admin2025/6/20 10:36:53【news】
简介wordpress扫码支付宝,关键词排名优化软件价格,opencart做的网站,网站设计就业要求python适用windows服务平台应用 win32gui,win32api,win32con 包simu_read.py编码以下:#-*- codingutf-8 -*-”’模拟按键换页Usage:python simu_read.py 10 1.510表明翻10页,1.5表明在一页中按pgdn的间隔时间为1.5s一页pgdn 3 次,以后按→翻到下一页把打…
python
适用windows服务平台
应用 win32gui,win32api,win32con 包
simu_read.py
编码以下:
#-*- coding=utf-8 -*-
”’
模拟按键换页
Usage:python simu_read.py 10 1.5
10表明翻10页,1.5表明在一页中按pgdn的间隔时间为1.5s
一页pgdn 3 次,以后按→翻到下一页
把打开浏览器到u17需看的动漫漫画中,以后起动该程序流程,再切回u17
便能够全自动换页看动漫了。
仅作游戏娱乐,掌握python模拟按键
”’
import win32gui,win32api,win32con
from ctypes import *
import time
import threading
import sys
”’ # mouse click is not used here ,- can replace it
def get_cursor_pos():
x,y = win32gui.GetCursorPos()
return (x,y)
def mouse_move(x,y):
windll.user32.SetCursorPos(x, y)
def mouse_click(x=None,y=None):
print ‘mouse_click’
if not x is None and not y is None:
mouse_move(x,y)
time.sleep(0.05)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
time.sleep(0.05)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
def test_pos():
for i in range(0,10):
time.sleep(0.5)
print get_cursor_pos()
”’
def key_up(key_num):
win32api.keybd_event(key_num,0,0,0)
win32api.keybd_event(key_num,0,win32con.KEYEVENTF_KEYUP,0)
def init_dict():
dict1 = {“PageDown”:34,’RightArrow’:39}
return dict1
if __name__ == ‘__main__’:
if len(sys.argv) != 3:
print ‘Usage:python simu_read.py pagenum interval’
sys.exit(-1)
try:
pagenum = int(sys.argv[1])
interval = float(sys.argv[2])
except ValueError:
print ‘Usage:python simu_read.py pagenum interval’
print ‘pagenum should be the type of int’
print ‘interval should be the type of float’
sys.exit(-1)
if pagenum 0 or pagenum 10000:
print ‘pagenum should be in the range [1,10000]’
sys.exit(-1)
if interval 0.1 or interval 60:
print ‘interval should be in the range [0.1,60]’
sys.exit(-1)
key_dict = init_dict()
stsec = 2
print ‘start in ‘ str(stsec) ’ seconds…’
time.sleep(stsec)
for i in range(0,pagenum):
for j in range(0,3):#generally,the height of one page is not more than 3 screensize
print ‘PageDown’
key_up(key_dict[‘PageDown’])
time.sleep(interval)
key_up(key_dict[‘RightArrow’])
print ‘Next page’
time.sleep(interval 0.2)#delay文章内容来源于:www.seo-7.comhttp://www.seo-6.com/seoyh/seojichurm/117641.html
(黑客微信:37009930)