1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/Bygones-PHP-DouyinRobot

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
Adb.php 1.5 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Bygones Отправлено 16.06.2019 08:47 a801f28
<?php
class Adb
{
protected $follow = [];
protected $slide = [];
protected $fabulous = [];
public function __construct(array $config)
{
$this->follow = $config["follow"];
$this->slide = $config["slide"];
$this->fabulous = $config["fabulous"];
}
/**
* Describe:关注
* @Author: Bygones
* Date: 2019-06-15
* Time: 23:16
* @return mixed
*/
public function Follow()
{
$x = $this->follow["x"];
$y = $this->follow["y"];
exec("adb shell input tap ".$x." ".$y." ");
return true;
}
/**
* Describe:滑动
* @Author: Bygones
* Date: 2019-06-15
* Time: 23:22
* @return mixed
*/
public function Slide()
{
$x = $this->slide["x"];
$y = $this->slide["y"];
$x1 = $this->slide["x1"];
$y1 = $this->slide["y1"];
exec("adb shell input swipe ".$x." ".$y." ".$x1." ".$y1." ");
return true;
}
/**
* Describe:点赞
* @Author: Bygones
* Date: 2019-06-16
* Time: 11:05
*/
public function Fabulous()
{
$x = $this->fabulous["x"];
$y = $this->fabulous["y"];
exec("adb shell input tap ".$x." ".$y." ");
return true;
}
/**
* Describe:截图
* @Author: Bygones
* Date: 2019-06-15
* Time: 23:33
*/
public function Screenshot()
{
$dir = __DIR__ . "/img/dy".date("YmdHis").".png";
exec("adb exec-out screencap -p > ".$dir);
return $dir;
}
}
?>

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/Bygones-PHP-DouyinRobot.git
git@api.gitlife.ru:oschina-mirror/Bygones-PHP-DouyinRobot.git
oschina-mirror
Bygones-PHP-DouyinRobot
Bygones-PHP-DouyinRobot
master