Hallo,
ich habe folgendes Problem und bitte um Mithilfe bei der Lösung.
Im nachstehenden Code bleibt die Anweisung
$oIE.document.body.scroll = "no" in Zeile 76
wirkungslos.
Spoiler anzeigen
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ie.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Local $msg = "", $titel = "Währungsrechner CAD => EUR", $valut1, $valut2
Local $oIE = _IECreateEmbedded()
#Region ### START Koda GUI section ### Form=
local $Form1 = GUICreate("Währungsrechner CAD <=> EUR", 620, 660, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_VISIBLE, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
Local $Label1 = GUICtrlCreateLabel("Wählen Sie Ausgangs- und Zielwährung und geben" & chr(13) & _
"Sie den Betrag ein, der umgerechnet weden soll." & chr(13) & _
"(Grundlage ist der Währungsrechner der TARGO-Bank.)", 10, 10, 290, 48)
Local $Group1 = GUICtrlCreateGroup("Auswahl", 310, 8, 120, 70)
Local $Radio1 = GUICtrlCreateRadio("CAD => EUR", 325, 30, 100, 17)
Local $Radio2 = GUICtrlCreateRadio("EUR => CAD", 325,54, 100, 17)
Local $Label2 = GUICtrlCreateLabel("Umrechnungs-" & chr(13) & "betrag:", 10, 64, 70, 32)
Local $Input1 = GUICtrlCreateInput("500", 90, 70, 201, 21)
Local $Button1 = GUICtrlCreateButton("Umrechnen", 470, 50, 97, 25)
Local $Button2 = GUICtrlCreateButton("Beenden", 470, 16, 97, 25)
Local $GUIActiveX = GUICtrlCreateObj($oIE, 10, 100, 600, 550)
GUISetState()
#EndRegion ### END Koda GUI section ###
GUICtrlSetState($Radio1,$GUI_CHECKED)
GUICtrlSetState($Button1, $GUI_FOCUS)
While 1
Local $nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE ; x im Fenster
Exit
Case $Button2 ;Cancel
Exit
Case $Button1 ; OK
Local $oInput = GUICtrlRead($Input1)
If $oInput = "" Then
$msg = MsgBox(37, $titel, "Es wurde kein Umrechnungsbetrag eingegeben." & chr(13) & _
"Soll der Vorgang wiederholt werden?")
Switch $msg
Case 2
Exit
Case 4
GUICtrlSetData($Input1, "Betrag als gültige Zahl eingeben")
EndSwitch
ElseIf $oInput <> "" Then
$j = 0
for $i = 1 to StringLen($oInput)
If Not ((Asc(StringMid($oInput, $i, 1)) >= 48 and Asc(StringMid($oInput, $i, 1)) <= 57) or Asc(StringMid($oInput, $i, 1)) = 44) Then
$j = $j + 1
EndIf
Next
If $j > 0 Then
$msg = MsgBox(37, $titel, "Es wurde keine gültige Zahl zur Umrechnung eingegeben." & chr(13) & _
"Soll der Vorgang wiederholt werden?")
Switch $msg
Case 2
Exit
Case 4
GUICtrlSetData($Input1, "Betrag gültige als Zahl eingeben")
EndSwitch
Else
If GUICtrlRead($Radio1) = 1 Then
$valut1 = "CAD"
$valut2 = "EUR"
ElseIf GUICtrlRead($Radio2) = 1 Then
$valut1 = "EUR"
$valut2 = "CAD"
EndIf
If IsObj($oIE) Then
_IENavigate($oIE,"https://investments.targobank.de/ciminfo/www/CIWI0294.html",1)
$oIE.document.body.scroll = "no"
$oForms = _IEFormGetCollection($oIE, 1)
$oForm = _IEFormElementGetObjByName($oForms, "Value_FROM")
_IEFormElementSetValue($oForm, $oInput)
$oForm = _IEFormElementGetObjByName($oForms, "ID_CURRENCY_FROM")
_IEFormElementOptionSelect($oForm, $valut1, 1,"byValue")
$oForm = _IEFormElementGetObjByName($oForms, "ID_CURRENCY_TO")
_IEFormElementOptionSelect($oForm, $valut2, 1,"byValue")
_IEFormImageClick($oIE,"Betrag umrechnen", "alt")
EndIf
EndIf
EndIf
EndSwitch
WEnd
Exit
Wo liegt mein Fehler? Gibt es dafür vielleicht noch eine andere Lösung?
Meine besherigen Nachforschungen zu Alternativen zum Thema waren bislang erfolglos.
Ich verwende "noch" Windows xp Sp3 und IE8