Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

30
LINES

< > BotCompany Repo | #1003351 // GMail Bot Backend (handling GMail, dev.)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1911L/12K/42K).

1  
!752
2  
3  
sS mail;
4  
sbool error;
5  
6  
// returns false if done, otherwise calls whenDone later
7  
static bool action(S s, final Runnable whenDone) {
8  
  new Matches m;
9  
  
10  
  if "Bot sets email address to *" {
11  
    S mail = m.unq(0).toLowerCase();
12  
    assertTrue(mail.endsWith("@gmail.com"));
13  
    main.mail = mail;
14  
    save("mail");
15  
    false;
16  
  }
17  
  
18  
  if "Bot starts password saver." {
19  
    load("mail");
20  
    awt {
21  
      S pass = swingEnterPassword("Please enter GMail password for " + mail);
22  
      if (pass == null)
23  
        error = true;
24  
      if (whenDone != null) whenDone.run();
25  
    }
26  
    true;
27  
  }
28  
29  
  throw fail("unknown command: " + quote(s));
30  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003351
Snippet name: GMail Bot Backend (handling GMail, dev.)
Eternal ID of this version: #1003351/1
Text MD5: df626933c30273277f507e0b1d58bd4d
Transpilation MD5: ecb222f51ac7d4e85c6441fa6871ac57
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-06-20 17:30:34
Source code size: 663 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 511 / 790
Referenced in: [show references]