Guest User

Untitled

a guest
May 20th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. import java.awt.*;
  2. import java.awt.event.*;
  3.  
  4. public class Email
  5. {
  6. public static String letters = "abcdefghijklmnopqrstuvwxyz1234567890@.";
  7.  
  8.  
  9. public static int[] keys =
  10. {
  11. KeyEvent.VK_A,KeyEvent.VK_B,KeyEvent.VK_C,
  12. KeyEvent.VK_D,KeyEvent.VK_E,KeyEvent.VK_F,
  13. KeyEvent.VK_G,KeyEvent.VK_H,KeyEvent.VK_I,
  14. KeyEvent.VK_J,KeyEvent.VK_K,KeyEvent.VK_L,
  15. KeyEvent.VK_M,KeyEvent.VK_N,KeyEvent.VK_O,
  16. KeyEvent.VK_P,KeyEvent.VK_Q,KeyEvent.VK_R,
  17. KeyEvent.VK_S,KeyEvent.VK_T,KeyEvent.VK_U,
  18. KeyEvent.VK_V,KeyEvent.VK_W,KeyEvent.VK_X,
  19. KeyEvent.VK_Y,KeyEvent.VK_Z,KeyEvent.VK_1,
  20. KeyEvent.VK_2,KeyEvent.VK_3,KeyEvent.VK_4,
  21. KeyEvent.VK_5,KeyEvent.VK_6,KeyEvent.VK_7,
  22. KeyEvent.VK_8,KeyEvent.VK_9,KeyEvent.VK_0,
  23. KeyEvent.VK_AT,KeyEvent.VK_DECIMAL
  24. };
  25.  
  26. public static int click = InputEvent.BUTTON1_MASK;
  27.  
  28. public static void main( String[] args ) throws Exception
  29. {
  30. Robot robot = new Robot();
  31.  
  32. int curNum = 50; // CHANGE THE NUMBER HERE FOR THE NUMBER AT THE END
  33.  
  34. robot.mouseMove( 760, 290 ); // Email
  35. click( robot );
  36. type( robot, "rgup123" + curNum );
  37. robot.mouseMove( 760, 320 );
  38. click( robot );
  39. type( robot, "1329515" );
  40. robot.mouseMove( 760, 370 );
  41. click( robot );
  42. type( robot, "1329515" );
  43. robot.mouseMove( 760, 430 );
  44. click( robot );
  45. type( robot, "7039545652" );
  46. robot.mouseMove( 760, 470 );
  47. click( robot );
  48. type( robot, "grishi69@yahoo.com" );
  49. robot.mouseMove( 760, 530 );
  50. click( robot );
  51. type( robot, "Rishi" );
  52. robot.mouseMove( 760, 560 );
  53. click( robot );
  54. type( robot, "Gupta" );
  55. robot.mouseMove( 760, 620 );
  56. click( robot );
  57. type( robot, "22310" );
  58. robot.mouseMove( 700, 660 );
  59. click( robot );
  60. Thread.sleep( 500 );
  61. robot.mouseMove( 700, 680 );
  62. click( robot );
  63. Thread.sleep( 500 );
  64. robot.mouseMove( 700, 720 );
  65. click( robot );
  66. Thread.sleep( 500 );
  67. robot.mouseMove( 800, 680 );
  68. click( robot );
  69. Thread.sleep( 500 );
  70. robot.mouseMove( 800, 660 );
  71. click( robot );
  72. robot.mouseMove( 870, 680 );
  73. click( robot );
  74. Thread.sleep( 500 );
  75. robot.mouseMove( 870, 660 );
  76. Thread.sleep( 500 );
  77. robot.mouseWheel( 5 );
  78. click( robot );
  79. }
  80.  
  81. public static void click( Robot e )
  82. {
  83. e.mousePress( click );
  84. e.mouseRelease( click );
  85. }
  86.  
  87. public static void type( Robot e, String text )
  88. {
  89. int pos = 0;
  90.  
  91. for( int i = 0; i < text.length(); i++ )
  92. {
  93. if( text.charAt( i ) == '@' )
  94. {
  95. e.keyPress( KeyEvent.VK_SHIFT );
  96. e.keyPress( KeyEvent.VK_2 );
  97. e.keyRelease( KeyEvent.VK_2 );
  98. e.keyRelease( KeyEvent.VK_SHIFT );
  99. }
  100.  
  101. else
  102. {
  103. e.keyPress( keys[ letters.indexOf( text.charAt( i ) ) ] );
  104. e.keyRelease(keys[ letters.indexOf( text.charAt( i ) ) ] );
  105. }
  106. }
  107. }
  108.  
  109.  
  110. }
Add Comment
Please, Sign In to add comment