Jump to content

How to Know IE form Submited


 Share

Recommended Posts

Well, this sounds kinda suspicious to me man... why do you want that?

And, to answer your question, I'll quote my last post

Too little information man... What happens when you submit that form successfully? Do you see a message, new text, ect?

Link to comment
Share on other sites

You cannot attach a registered message or anything, like you might a Windows API GUI, to a browser object unless you want to play code-injection. But that has a good chance of interfering with the normal operation of scripts that are already in the page.

Just monitor _IEPropertyGet($oIE, "busy").

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

You can register an event handler to be notified onsubmit. Limitations in the way that AutoIt processes COM events make it important to know what you need to accomplish because it can either be done client-side by injecting some Javascript or it can be done in AutoIt (but in AutoIt you find out about the event outside the event processing logic - typically after the event has already been processed).

Functions involved: OjbEvent or _IEHeadInsertEventScript

Dale

edit: typo

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Hi

Functions involved: OjbEvent or _IEHeadInsertEventScript

can we inject onsubmit in <form> like we do in <head> for onclick using _IEHeadInsertEventScript any way to inject onsubmit event handler in page ?

and do tell me how to do with OjbEvent :)

Just monitor _IEPropertyGet($oIE, "busy")

how it works ? ^_^

#include <IE.au3>
$oIE = _IE_Example ("basic")
If _IEPropertyGet ($oIE, "busy") Then
    MsgBox(0, "Status", "Busy")
Endif
Edited by autoitxp
Link to comment
Share on other sites

how it works ? :)

#include <IE.au3>
$oIE = _IE_Example ("basic")
If _IEPropertyGet ($oIE, "busy") Then
    MsgBox(0, "Status", "Busy")
Endif
I was thinking more like this:

#include <IE.au3>

HotKeySet("{ESC}", "_Quit")

$oIE = _IE_Example("basic")
While 1
    If _IEPropertyGet($oIE, "busy") Then
        MsgBox(0, "Status", "Busy", 2)
    EndIf
    Sleep(20)
WEnd

Func _Quit()
    _IEQuit($oIE)
    Exit
EndFunc   ;==>_Quit

^_^

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

can we inject onsubmit in <form> like we do in <head> for onclick using _IEHeadInsertEventScript any way to inject onsubmit event handler in page ?

and do tell me how to do with OjbEvent :)

I'm not going to try to guess what you are trying to accomplish and cover every scenario for you. This is not a training class. You offer more detail about what you are trying to do and preferably post some code you've tried before I invest any more of my time.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

ok here is full code i want to call _onsubmit function when user press on submit button in form :)

currently im using substitute _IsPressed("01", $dll) and _IsPressed("0D", $dll) to monitor onsubmit button

^_^

#include <GUIConstants.au3>
#include <Misc.au3>
#include <IE.au3>
#include <file.au3>


Local   $sTexts

GUICreate("_IE")  
GUISetState (@SW_SHOW)   


$dll = DllOpen("user32.dll")


While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case  _IsPressed("01", $dll) 
        _IE()
    Case  _IsPressed("0D", $dll) 
        _IE()
EndSelect
Wend
    
    
Func _IE()
    
$oIE = _IEAttach("Submit !")
_IELoadWait($oIE)

$colForms = _IEFormGetCollection($oIE)
If @error Then
Else
    
$iFormCnt = @extended
$iForm = 0
$sMsg = "Element values:" & @CRLF
For $oForm In $colForms
    $colElem = _IEFormElementGetCollection($oForm)
    $iElemCnt = @extended
    
    $iElem = 0
    For $oElem In $colElem
        $sMsg &= "Form " & $iForm & ": Elem " & $iElem & ":  " & _IEFormElementGetValue($oElem) & @CRLF
        $iElem += 1
    Next
    
    $iForm += 1
Next

EndIf
    EndFunc


Func _onsubmit()

$file = FileOpen("mylog.txt",1)
FileWrite($file, $sMsg)
FileClose($file)
    EndFunc

    DllClose($dll)
Edited by autoitxp
Link to comment
Share on other sites

You've still said nothing about what you are trying to accomplish.

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

well this code self says i waz try to get all elements that client types and get saved copy in text file ??? :) what else u want me to say

simply i want to get that data when user press submit button

and i dont have rights to do somthing in page $oIE = _IEAttach("Submit !")

Edited by autoitxp
Link to comment
Share on other sites

So, you are trying to capture the value of the form elements after the submit button is pressed and you want return those values to AutoIt. Please go back and read the first reply that I gave you here telling you about the way that AutoIt processes COM events. From inside AutoIt you will not be informed of the onsubmit event until after the form has been processed in the data has been passed to the Web server.

There are ways that this could be accomplished with a combination of AutoIt scripts and client-side Javascript, but I believe that they are beyond your level of expertise at this time. In addition, your reticence to discuss why you are trying to do this makes me concerned about your intentions. I have no desire to help you create a spy bot.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

well if u think this is spy bot then your all IE functions are spy bot coz acutally they do nothing but getting information to forms and urls

and Remember if you think my script is Suspicious then dont reply and answer only question asked dont argue autoit form users

Your only person i see arguing more then submiting code

Dont mind but simply your good for nothing

Edited by autoitxp
Link to comment
Share on other sites

well if u think this is spy bot then your all IE functions are spy bot coz acutally they do nothing but getting information to forms and urls

Step back, pinhead. Overstated righteous indignation makes you seem more suspicious, not less. ^_^

AutoIt functionality, like any other tool, can be used for malicious purposes as easily as benign. Not discussing things like key loggers on this forum doesn't prevent them from getting done elsewhere, but it keeps at least this forum clean of such claptrap.

and Remember if you think my script is Suspicious then dont reply and answer only question asked dont argue autoit form users

As explained above, this forum is not open to absolutely everything that might be done with AutoIt. Things so easily used for malicious purposes are simply not discussed here. Search the forums and see some of the comic attempts that have been made at excuses to get help with a key logger.

Your only person i see arguing more then submiting code

Dont mind but simply your good for nothing

The excellent code developed and contributed to AutoIt by Dale Hohm is widely recognized by people much smarter than you as useful, efficient, clean, and easy to use. Dale's UDFs make up a substantial fraction of the code Jon chooses to ship with AutoIt in the current distribution.

Now let's hear about all your great contributions...

<crickets chirpping...> :)

Nothing? I thought not.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

well if u think this is spy bot then your all IE functions are spy bot coz acutally they do nothing but getting information to forms and urls

and Remember if you think my script is Suspicious then dont reply and answer only question asked dont argue autoit form users

Your only person i see arguing more then submiting code

Dont mind but simply your good for nothing

Actually he did try to help, but he also wanted to know your intentions, and I have to agree with him, your reluctance to reveal why your trying to do this does not look good.

If you any else negative to say to anyone go ahead and try me.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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