Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If FileExists(@scriptdir&"/logindata.ini") Then
- GUICtrlSetData($fUsername, IniRead(@scriptdir&"/logindata.ini", "Logindata", "username", ""))
- GUICtrlSetData($fPassword, IniRead(@scriptdir&"/logindata.ini", "Logindata", "password", ""))
- EndIf
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case $GUI_EVENT_CLOSE
- Exit
- Case $fLoginbutton
- LoginProcess(GUICtrlRead($fUsername), GUICtrlRead($fPassword))
- EndSwitch
- WEnd
- Func LoginProcess($user, $pass)
- IniWrite(@scriptdir&"/logindata.ini", "Logindata", "username", $user)
- IniWrite(@scriptdir&"/logindata.ini", "Logindata", "password", $pass)
- $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"
- _IENavigate($oIE, $sURL)
- $oForm = _IEFormGetCollection($oIE, 0)
- $oUsername = _IEFormElementGetObjByName($oForm, "edit[id]")
- $oPassword = _IEFormElementGetObjByName($oForm, "edit[pass]")
- _IEFormElementSetValue($oUsername, $user)
- _IEFormElementSetValue($oPassword, $pass)
- _IEFormSubmit($oForm, 0)
- _IELoadWait($oIE)
- If _IEPropertyGet($oIE, "innertext") == "." Then
- $code = _IEPropertyGet($oIE, "locationurl")
- $code = StringTrimLeft($code, StringInStr($code, "code=")+4)
- Run('"S4Client.exe" -rc:eu -lac:ger -auth_server_ip:83.220.134.84 -aeria_acc_code:'&$code)
- Exit
- Else
- MsgBox(48, "Error", "Wrong Username or Password!")
- EndIf
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement