Created
February 25, 2015 14:17
-
-
Save codetalks-new/0eb138c4c9ef180b8cb5 to your computer and use it in GitHub Desktop.
Alipay 自动抢红包脚本
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from time import sleep,time | |
# Imports the monkeyrunner modules used by this program | |
from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice | |
# Connects to the current device, returning a MonkeyDevice object | |
print("Waiting for connect...") | |
device = MonkeyRunner.waitForConnection() | |
print("Connected") | |
while True: | |
start = time() | |
for x in xrange(32,700,64): | |
for y in xrange(128,1080,64): | |
device.touch(x,y,MonkeyDevice.DOWN_AND_UP) | |
if y > 128 and y % 192 == 0: | |
sleep(0.002) | |
#print("touch One ",x,y) | |
end = time() | |
print("Scan finished seconds used ",(end - start)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment