Skip to content

Instantly share code, notes, and snippets.

@esauvisky
Last active March 16, 2019 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esauvisky/cb02da4a57883ab9405062272e4e4c6e to your computer and use it in GitHub Desktop.
Save esauvisky/cb02da4a57883ab9405062272e4e4c6e to your computer and use it in GitHub Desktop.
Script to test issue on PokemonGo-CalcyIV-Renamer (requires pokemonlib.py)
#!/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