Last active
March 16, 2019 23:53
-
-
Save esauvisky/cb02da4a57883ab9405062272e4e4c6e to your computer and use it in GitHub Desktop.
Script to test issue on PokemonGo-CalcyIV-Renamer (requires pokemonlib.py)
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
#!/usr/bin/env python3.7 | |
from pokemonlib import PokemonGo | |
import asyncio | |
import logging | |
from sys import platform | |
CALCY_STRING = 'A0\u00A0,0\u2000,1\u2001,2\u2002,3\u2003,4\u2004,5\u2005,6\u2006,7\u2007,8\u2008,9\u2009,A\u200A,B\u200B' | |
logger = logging.getLogger('ivcheck') | |
logger.setLevel(logging.INFO) | |
ch = logging.StreamHandler() | |
ch.setLevel(logging.INFO) | |
logger.addHandler(ch) | |
class Main: | |
async def start(self): | |
self.p = PokemonGo() | |
await self.p.get_device() | |
await self.p.start_logcat() | |
logger.info('sending clipboard to device...') | |
await self.p.send_intent("clipper.set", extra_values=[["text", CALCY_STRING]]) | |
clipboard = await self.p.get_clipboard() | |
logger.info('clipboard is: ' + clipboard) | |
if __name__ == '__main__': | |
if platform == 'win32': | |
asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy()) | |
asyncio.run(Main().start()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment