From 6e4c7d5a0f1e5d416b204e83348df3a619631d8f Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sun, 22 Sep 2013 12:14:49 -0500 Subject: pause a few frames before typing on a keyboard For names that weren't starting with a capletter, the "select" button to switch to downcase was happening too soon. So add in a small delay to get the keyboard writing to work. --- pokemontools/vba/vba.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pokemontools/vba/vba.py') diff --git a/pokemontools/vba/vba.py b/pokemontools/vba/vba.py index 3c8c084..654292e 100644 --- a/pokemontools/vba/vba.py +++ b/pokemontools/vba/vba.py @@ -430,7 +430,12 @@ class crystal(object): """ for buttons in button_sequence: self.vba.press(buttons) - self.vba.step(count=2) + + if buttons == "select": + self.vba.step(count=5) + else: + self.vba.step(count=2) + self.vba.press([]) def write(self, something="TrAiNeR"): @@ -440,7 +445,9 @@ class crystal(object): Uses a planning algorithm to do this in the most efficient way possible. """ button_sequence = keyboard.plan_typing(something) + self.vba.step(count=10) self.keyboard_apply([[x] for x in button_sequence]) + return button_sequence def set_partymon2(self): """ -- cgit v1.2.3