Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1.  
  2. If FileExists(@scriptdir&"/logindata.ini") Then
  3. GUICtrlSetData($fUsername, IniRead(@scriptdir&"/logindata.ini", "Logindata", "username", ""))
  4. GUICtrlSetData($fPassword, IniRead(@scriptdir&"/logindata.ini", "Logindata", "password", ""))
  5. EndIf
  6.  
  7.  
  8. While 1
  9. $nMsg = GUIGetMsg()
  10. Switch $nMsg
  11. Case $GUI_EVENT_CLOSE
  12. Exit
  13. Case $fLoginbutton
  14. LoginProcess(GUICtrlRead($fUsername), GUICtrlRead($fPassword))
  15.  
  16. EndSwitch
  17. WEnd
  18.  
  19. Func LoginProcess($user, $pass)
  20. IniWrite(@scriptdir&"/logindata.ini", "Logindata", "username", $user)
  21. IniWrite(@scriptdir&"/logindata.ini", "Logindata", "password", $pass)
  22. $sURL = "https://www.aeriagames.com/dialog/oauth?response_type=code&client_id=a354ab1d0894ba2ecaac12bf5ad86fd905373a07f&redirect_uri=https://www.aeriagames.com/content_only_launcher&theme=api_ignite"
  23. _IENavigate($oIE, $sURL)
  24. $oForm = _IEFormGetCollection($oIE, 0)
  25. $oUsername = _IEFormElementGetObjByName($oForm, "edit[id]")
  26. $oPassword = _IEFormElementGetObjByName($oForm, "edit[pass]")
  27. _IEFormElementSetValue($oUsername, $user)
  28. _IEFormElementSetValue($oPassword, $pass)
  29. _IEFormSubmit($oForm, 0)
  30. _IELoadWait($oIE)
  31.  
  32. If _IEPropertyGet($oIE, "innertext") == "." Then
  33. $code = _IEPropertyGet($oIE, "locationurl")
  34. $code = StringTrimLeft($code, StringInStr($code, "code=")+4)
  35. Run('"S4Client.exe" -rc:eu -lac:ger -auth_server_ip:83.220.134.84 -aeria_acc_code:'&$code)
  36. Exit
  37. Else
  38. MsgBox(48, "Error", "Wrong Username or Password!")
  39. EndIf
  40. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement