Guest User

Untitled

a guest
Jul 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. import random;
  2.  
  3. def alphabet_range(start_with, limit):
  4. alphabet = '$abcdefghijklmnopqrstuvwxyz' # alphabet set, don't modify it
  5. i = 0
  6. n = 0
  7. while n < limit: # from 1 to some number
  8. w = []
  9. k = i
  10. while k > 0:
  11. w.append(alphabet[k % 27]) # shortcut for enumeration, covert to 27-ary number
  12. k = k / 27
  13. i += 1
  14. if w.count('$') > 0:
  15. continue
  16. w.reverse() # reverse the list (otherwise will be aa, ba, ca, da, strange)
  17. word = ''.join(w) # generate string
  18. if start_with is not None and word != start_with: #check if it is start string, if not, continue
  19. continue
  20. start_with = None # if it is, start from here, output every string
  21. n += 1
  22. yield word # output generated string
  23.  
  24. pics=[ , , , , , , , , , , , , , , , , , , , , , , , , , , , ]
  25. for word in alphabet_range('abc', 5000):
  26. switchApp("firefox.app")
  27. if exists( ):
  28. click( )
  29. wait(8)
  30. click( )
  31. wait(8)
  32. else:
  33. wait(0)
  34. switchApp("firefox.app")
  35. while not exists ( ):
  36. sleep(0.01)
  37. click( )
  38. while not exists( ):
  39. sleep(0.01)
  40. keyDown(Key.PAGE_DOWN)
  41. keyUp()
  42. click( )
  43. keyDown(Key.BACKSPACE)
  44. keyUp()
  45. wait(2)
  46. keyDown(Key.BACKSPACE)
  47. keyUp()
  48. wait(2)
  49. type(word)
  50. wait(2)
  51. keyDown(Key.ENTER)
  52. keyUp()
  53. click( )
  54. wait(2)
  55. while not exists( ):
  56. sleep(0.01)
  57. keyDown(Key.END)
  58. keyUp()
  59. click( )
Add Comment
Please, Sign In to add comment