Jump to content

can't submit form in Forumfree


ra95
 Share

Recommended Posts

Hi

I have tried submit a post in a forumfreem with autoit, but i no submitted.

why??

help me

my code:

#include <IE.au3>

$oIE = _IEcreate()
_IENavigate($oIE, "http://site.forumfree.net/?t=30818457")
$txt = "text for forumfree....."
$o_form  = _IEFormGetObjByName($oIE, "REPLIER")
$o_message   = _IEFormElementGetObjByName($o_form, "Post")
_IEDocInsertText($o_message, $txt)
sleep(10000)
_IEFormSubmit($o_form)

Please help me... thx

Edited by ra95
Link to comment
Share on other sites

Welcome.

A couple of things...

I doubt that _IEDocInsertText is what you want... more likely you want _IEFormElementSetValue

_IEFormSubmit often does not work because the form uses other methods to trigger submission of new data. Please see the remarks for _IEFormSubmit in the helpfile and try _IEAction instead.

I can only guess because you don't provide much detail. Please do more to explain what *does* happen when you have trouble in the future.

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

Welcome.

A couple of things...

I doubt that _IEDocInsertText is what you want... more likely you want _IEFormElementSetValue

_IEFormSubmit often does not work because the form uses other methods to trigger submission of new data. Please see the remarks for _IEFormSubmit in the helpfile and try _IEAction instead.

I can only guess because you don't provide much detail. Please do more to explain what *does* happen when you have trouble in the future.

Dale

Hi Dale you are my guru!!! Thx for all your post.

I give you some information.

I want grab a portion of webpage (I do it), and past in a post of 3d in Forumfree.

In special mode i want reply to discussion in automatic.

Have you a script, or method for analyze webpage for find a exact object of submit???

I have tried FF analyzer...

I think the problem is a not correct name of form.. or something... similar...

The errorcode is.

"IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType"

Sorry for my bad english.

Antonio

Link to comment
Share on other sites

Hi Dale you are my guru!!! Thx for all your post.

I give you some information.

I want grab a portion of webpage (I do it), and past in a post of 3d in Forumfree.

In special mode i want reply to discussion in automatic.

Have you a script, or method for analyze webpage for find a exact object of submit???

I have tried FF analyzer...

I think the problem is a not correct name of form.. or something... similar...

The errorcode is.

"IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType"

Sorry for my bad english.

Antonio

OK i Thing for me the best solution is FF.au3

but i can't send txt to form....

can you indicate the correct function for do it???

Thx

Anotnio

Link to comment
Share on other sites

First, I highly recommend DebugBar for examining the webpage objects (see my sig).

I can't comment on FF.au3, but can help with IE.

--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType"

The first essor is telling you that you DID pass an object to _IEFormElementGetObjByName, but it is not the required form object (did you pass $oIE perhaps?). The second error is telling you the first paramater you passed to _IEAction is not an object at all.

Hopefully this along with DebugBar will get you pointed in the right direction.

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

First, I highly recommend DebugBar for examining the webpage objects (see my sig).

I can't comment on FF.au3, but can help with IE.

--> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidObjectType

--> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType"

The first essor is telling you that you DID pass an object to _IEFormElementGetObjByName, but it is not the required form object (did you pass $oIE perhaps?). The second error is telling you the first paramater you passed to _IEAction is not an object at all.

Hopefully this along with DebugBar will get you pointed in the right direction.

Dale

Ok Dale...

i try tomorrow with your debugg bar... and see the result...

very thx

Antonio

Link to comment
Share on other sites

Ok Dale...

i try tomorrow with your debugg bar... and see the result...

very thx

Antonio

OK Dale

Your example and correct information have suggest correct direction.

I'm solved problem.

This script Work with Forumfree !!!!

#include <IE.au3>

$txt = clipget(); I have copy from clipboard but it's possible insert other
$oIE = _IECreate()
_IENavigate($oIE, "http://Siteofforumfree.forumfree.net/?t=30818457"); it's only example
$o_form = _IEFormGetObjByName($oIE, "REPLIER"); Find for section Quick reply
$o_post = _IEFormElementGetObjByName($o_form, "post"); Select sectin Textarea
_IEFormElementSetValue($o_post, $txt); Insert Text
$oSubmit = _IEGetObjByName ($oIE, "submit"); Find Exact position Submit "i don't have find other metod for submit" This Work fine!!!!
_IEAction($osubmit, "click"); Click on Submit - 
Exit

This code is a little contribute for the comunity.

Thx

Antonio

Edited by ra95
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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