Jump to content

Issue with _IEFormSubmit()


Go to solution Solved by Danp2,

Recommended Posts

Posted

Data seems to be insterted into InputBox on website just fine, but upon form being submitted, string simply disappears and website returns no data. There is some Javascript on site but I haven't managed to find a way for getting past it.

I created basic GUI for illustrating the issue I am stuck with

#include <WindowsConstants.au3>
#include <IE.au3>

Opt("GUIOnEventMode", 1)
;Const $WINTITLE = "Piiriületus"

Local $oIE = _IECreateEmbedded()
$Form1 = GUICreate("needed some GUI", 972, 595, 13, 117, $WS_EX_CLIENTEDGE + $WS_DLGFRAME + $DS_MODALFRAME, $WS_EX_APPWINDOW + $WS_EX_TOOLWINDOW + $WS_EX_WINDOWEDGE + $WS_EX_DLGMODALFRAME)
GUICtrlCreateObj($oIE, 8, 8, 956, 540)

$PullNr = GUICtrlCreateButton("Push me", 8, 552, 75, 25)
GUICtrlSetOnEvent($PullNr, "_Data")

$ExitB = GUICtrlCreateButton("Exit", 888, 552, 75, 25)
GUICtrlSetOnEvent($ExitB, "_Exit")
GUISetState(@SW_SHOW)

_IENavigate($oIE, "https://vs.lkf.ee/pls/xlk/SYSADM.LK_INFOKESKUS_PKT.kindlustuskate")

While 1
    Sleep(10)
WEnd

Func _Exit()
    Exit
EndFunc 

Func _Data()
    ;Local $Data = ControlGetText($WINTITLE,"", "Edit25")
    ;replacement drop-in, since the program from where data is supposedly pulled from
    ; is not available for testing here and now.
    Local $Data = "001AAA"
    Local $oForm = _IEFormGetObjByName($oIE, "kindlustuskate")
    Local $oText = _IEFormElementGetObjByName($oForm, "pregnr")
    _IEFormElementSetValue($oText, $Data)
    _IEFormSubmit($oForm)

EndFunc

Help or helping hints would be appreciated:)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...