!752 sS mail; sbool error; // returns false if done, otherwise calls whenDone later static bool action(S s, final Runnable whenDone) { new Matches m; if "Bot sets email address to *" { S mail = m.unq(0).toLowerCase(); assertTrue(mail.endsWith("@gmail.com")); main.mail = mail; save("mail"); false; } if "Bot starts password saver." { load("mail"); awt { S pass = swingEnterPassword("Please enter GMail password for " + mail); if (pass == null) error = true; if (whenDone != null) whenDone.run(); } true; } throw fail("unknown command: " + quote(s)); }