Advertisement
Guest User

Auto Login

a guest
Apr 28th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. #include <AutoItConstants.au3>
  2. #include <MsgBoxConstants.au3>
  3. #include <NomadMemory.au3>
  4. #include <ButtonConstants.au3>
  5. #include <EditConstants.au3>
  6. #include <GUIConstantsEx.au3>
  7. #include <StaticConstants.au3>
  8. #include <WindowsConstants.au3>
  9. #include <Constants.au3>
  10. #include <MsgBoxConstants.au3>
  11. #include <Array.au3>
  12. #include <GuiListView.au3>
  13. #RequireAdmin
  14. ;~ Lấy Thông Tin Cửa Sổ
  15. GuiSetIcon(@DesktopCommonDir & "\1.ico")
  16. GUICtrlSetFont(-1, 24, 800, 0, "Tahoma")
  17. GUICtrlSetColor(-1, 0x0000FF)
  18. $Form1 = GUICreate("AutoGame Tây Du Ký", 300, 600, 1050, 16) ;Tiêu Đề
  19.  
  20. Local $hWnd = WinWait("[CLASS:LineKongGame]", "", 1)
  21. WinActivate("[CLASS:LineKongGame]", "")
  22.  
  23.  
  24. GUICtrlSetState(-1, $GUI_CHECKED)
  25. GUICtrlSetState(-1, $GUI_FOCUS)
  26.  
  27. $exit = GUICtrlCreateButton("Thoát", 187, 10, 75, 25) ;Nút Dừng
  28. $Group1 = GUICtrlCreateGroup("Tester", 10, 40, 280, 90)
  29. $Login = GUICtrlCreateButton("Đăng Nhập", 100, 63, 80, 21)
  30.  
  31. $cb = GUICtrlCreateCombo("ID", 85, 97, 100, 21)
  32. ;GUICtrlSetData(-1, "ID 1| ID 2 | ID 3")
  33.  
  34. GUISetState(@SW_SHOW)
  35.  
  36. Global $X
  37. _LoadTaiKhoan()
  38. ;~ Hàm Điều Khiển Nút
  39. While 1
  40. $nMsg = GUIGetMsg()
  41. Switch $nMsg
  42. Case $Login
  43. Login()
  44. Case $exit
  45. _Exit()
  46. EndSwitch
  47. WEnd
  48.  
  49.  
  50.  
  51. Func Login()
  52. ;lay pass theo id
  53. $Count = UBound($X)
  54. $Pass = ""
  55. For $i = 1 to $Count -1
  56. ;tach NAME ID PASS
  57. $ACC = StringSplit($X[$i], "-")
  58. $ID = $ACC[2]
  59.  
  60. If GUICtrlRead($cb) = $ID Then
  61. $Pass = $ACC[3]
  62. ExitLoop
  63. EndIf
  64. Next
  65.  
  66. if $Pass <> "" then
  67. WinActivate("[CLASS:LineKongGame]", "")
  68. WinSetState($hWnd, "", @SW_SHOW)
  69. WinMove($hWnd, "", 283, 84, 808, 631)
  70. MouseClick("left",754,343,2,0)
  71. Send('{DELETE}')
  72. Sleep(50)
  73. Send(GUICtrlRead($cb))
  74. ;~ Sleep(500)
  75. MouseClick("left",754,403,1,5)
  76. Send($Pass)
  77. MouseClick("left",691, 453,1,5)
  78.  
  79. Else
  80. MsgBox(0,0,"Không tim thấy Pass")
  81. EndIf
  82. EndFunc ;==>HotKeyPressed
  83.  
  84. Func _LoadTaiKhoan()
  85. $DuLieu = FileRead(@ScriptDir & "\ID.txt")
  86.  
  87. ;add ds mới
  88. $DanhSach = StringReplace($DuLieu,@CRLF,"|")
  89. $X = StringSplit($DanhSach,'|')
  90.  
  91. $Count = UBound($X)
  92. For $i = 1 to $Count -1
  93. ;tach NAME ID PASS
  94.  
  95. $ACC = StringSplit($X[$i], "-")
  96. $Name = $ACC[1]
  97. $ID = $ACC[2]
  98. $Pass = $ACC[3]
  99.  
  100. GUICtrlSetData($cb,$ID)
  101. Next
  102. EndFunc
  103.  
  104. ;~ Lệnh Thoát
  105. Func _Exit()
  106. Local $hWnd = WinWait("[CLASS:LineKongGame]", "", 1)
  107.  
  108. ;~ Set Name Cửa Sổ
  109. WinSetTitle($hWnd, "", "西游记 - V1.0.22.43@双线三区 - 马到功成")
  110. Exit
  111. Endfunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement