Hermes hat die Webseite geändert, sodass mein bisheriges Script zwar die Daten einträgt, die dann aber nicht übernommen, sondern gelöscht werden, wenn man zB die Boxen durchklickt.
Wie kriegt man das hin?
Code
#include <IE.au3>
$Url = "https://www.myhermes.de/wps/portal/paket/Home/privatkunden/versenden/paket"
$oIE = _IECreate($Url, 0, 1, 1, 1)
;WinWait("Paketschein erstellen - Internet Explorer",5)
sleep(500)
WinSetState ( "Paketschein erstellen", "", @SW_MAXIMIZE )
$oForm = _IEFormGetCollection($oIE,2)
;_IELinkClickByText($oForm,"+")
$eLand="Deutschland"
if $eLand<>"Deutschland" then
$oSelect = _IEGetObjById($oForm, "parcelclass-cc")
_IEFormElementOptionSelect ($oSelect, $eLand, 1, "byText",1)
$oEvt = $oIE.document.createEvent("HTMLEvents")
$oEvt.initEvent("change", True, False)
$oSelect.dispatchEvent($oEvt)
sleep(1000)
$oForm = _IEFormGetCollection($oIE,1)
for $formid in $oForm
ConsoleWrite($formid.id & @CRLF);
Next
$oFirma = _IEGetObjById($oForm, "parcelclass-HP")
_IEAction ($oFirma, "click")
EndIf
$oFirma = _IEGetObjById($oForm, "senderAddressLastname")
_IEFormElementSetValue($oFirma, "$aNACHNAME")
$oFirma = _IEGetObjById($oForm, "senderAddressFirstname")
_IEFormElementSetValue($oFirma, "$aVORNAME")
$oFirma = _IEGetObjById($oForm, "senderAddressAddition")
_IEFormElementSetValue($oFirma, "$aADRESSZUSATZ")
$oFirma = _IEGetObjById($oForm, "senderAddressStreet")
_IEFormElementSetValue($oFirma, "$aSTRASSE")
$oFirma = _IEGetObjById($oForm, "senderAddressHouseNumber")
_IEFormElementSetValue($oFirma, "$aHAUSNUMMER")
$oFirma = _IEGetObjById($oForm, "senderAddressZipCode")
_IEFormElementSetValue($oFirma, "$aPLZ")
$oFirma = _IEGetObjById($oForm, "senderAddressCity")
_IEFormElementSetValue($oFirma, "$aORT")
$oFirma = _IEGetObjById($oForm, "senderAreaCode")
_IEFormElementSetValue($oFirma, "$aVORWAHL")
$oFirma = _IEGetObjById($oForm, "senderPhone")
_IEFormElementSetValue($oFirma, "$aTELEFON")
$oFirma = _IEGetObjById($oForm, "senderEmail")
_IEFormElementSetValue($oFirma, "$aEMAIL")
$oFirma = _IEGetObjById($oForm, "receiverAddressLastname")
_IEFormElementSetValue($oFirma, "$eNACHNAME")
$oFirma = _IEGetObjById($oForm, "receiverAddressFirstname")
_IEFormElementSetValue($oFirma, "$eVORNAME")
$oFirma = _IEGetObjById($oForm, "receiverAddressAddition")
_IEFormElementSetValue($oFirma, "$eADRESSZUSATZ")
$oFirma = _IEGetObjById($oForm, "receiverAddressStreet")
_IEFormElementSetValue($oFirma, "$eSTRASSE")
$oFirma = _IEGetObjById($oForm, "receiverAddressHouseNumber")
_IEFormElementSetValue($oFirma, "$eHAUSNUMMER")
$oFirma = _IEGetObjById($oForm, "receiverAddressZipCode")
_IEFormElementSetValue($oFirma, "$ePLZ")
$oFirma = _IEGetObjById($oForm, "receiverAddressCity")
_IEFormElementSetValue($oFirma, "$eORT")
$oFirma = _IEGetObjById($oForm, "receiverAreaCode")
_IEFormElementSetValue($oFirma, "$eVORWAHL")
$oFirma = _IEGetObjById($oForm, "receiverPhone")
_IEFormElementSetValue($oFirma, "$eTELEFON")
$oFirma = _IEGetObjById($oForm, "receiverEmail")
_IEFormElementSetValue($oFirma, "$eEMAIL")
$oFirma = _IEGetObjById($oForm, "senderEbayAuctionNumber")
_IEFormElementSetValue($oFirma, "stringmid($mark,6,14)")
$oFirma = _IEGetObjById($oForm, "parcelclass-HP")
_IEAction ($oFirma, "click")
;$oFirma = _IEGetObjById($oIE,"send_business")
;_IEAction ($oFirma, "click")
;$oFirma = _IEGetObjById($oIE,"liabilityAccepted")
;_IEAction ($oFirma, "click")
;$oFirma = _IEGetObjById($oIE,"tocAccepted")
;_IEAction ($oFirma, "click")
;$button=_IEGetObjById($oForm,"increase0Amount")
;_IEAction($button,"click")
$oIE = 0
Exit
Alles anzeigen