Code:
#include <Forms\accManager.isf>
#include <accDaten.ini>
#include <WinHttp.au3>
#Include <GuiButton.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
Global $accManager = GUICreate("accManager",533,307,-1,-1,-1,-1)
GUICtrlCreateInput("username",20,20,150,20,-1,512)
GUICtrlCreateInput("password",20,60,150,20,32,512)
GUICtrlCreateInput("server",20,100,150,20,-1,512)
GUICtrlCreateButton("login",50,140,100,30,-1,-1)
GUICtrlCreateProgress(20,190,151,20,8388609,-1)
GUICtrlCreatelist("",200,20,303,188,-1,131584)
GUISetState(@SW_SHOW,$accManager)
While 1
$nmsg = GUIGetMsg()
Switch $nmsg
Case $gui_event_close
Exit
Case $login
$login = GUICtrlRead($serv) & ".darkorbit.bigpoint.com"
TrayTip("", "Open Connection", 10)
$hSession = _WinHttpOpen("Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0") ;<====Opens a connection
TrayTip("", "Connecting", 10)
$hConnect = _WinHttpConnect($hSession, $login) ;<===Connecting to DO
TrayTip("", "Get Serverlist", 10)
$sHtml = _WinHttpSimpleRequest($hConnect, "GET", "")
$sHtml = _WinHttpSimpleRequest($hConnect, "POST", "?locale=de&aid=2997&aip=", $login, $logined) ;<===Start Login in D0;
$aString = _StringBetween($sHtml, 'class="serverSelection_ini ini_active" target="http://' & GUICtrlRead($serv), '" onclick="InstanceSelection.clickedIni(this);"') ;<====Get the serverselection number, to login to the right server
$aString = "http://" & GUICtrlRead($serv) & $aString[0]
TrayTip("", "Loging in", 10)
$sHtml = _WinHttpSimpleRequest($hConnect, "GET", $aString, $login) ;<===Login
TrayTip("", "Get Startpage", 10)
$sHtml = _WinHttpSimpleRequest($hConnect, "GET", "indexInternal.es?action=internalStart", $login, "indexInternal.es?action=internalStart") ;<===Logined :)
EndSwitch
WEnd
Func decode($string) ;<====Decode the name, to use Specialcharacters like ?
$decoded = ""
$temp = StringToBinary($string, 4)
$temp = StringTrimLeft($temp, 2)
For $i = 1 To StringLen($temp) Step 2
$decoded = $decoded & "%" & StringMid($temp, $i, 2)
Next
Return $decoded
EndFunc