Jump to content

Recommended Posts

Posted (edited)

Hi,

I have a problem:

It's suppose to do the following:

1. Open the new topic in autoit's forum

2. Write Something in the Textarea section, where we type the messages.

#include <IE.au3>

$oIE = _IECreate("http://www.autoitscript.com/forum/index.php?&act=post&do=new_post&f=2")
$Form = _IEFormGetObjByName($oIE, "postingforum")
$Query = _IEFormElementGetObjByName($oIE, "Post")
_IEFormElementSetValue($Query, "Test")oÝ÷ Ù8^/yÚ²}ýµø¥)í鲯 z«´w«z+&ËiÝr^jëh×6#include <IE.au3>

oIE = _IECreate("http://www.autoitscript.com/forum/index.php?&act=post&do=new_post&f=2")
$Form = _IEFormGetObjByName($oIE, "postingforum")
$Query = _IEFormElementGetCollection($Form, 0)
For $a = @extended To 0 Step - 1
$Query = _IEFormElementGetCollection($Form, $a)
_IEFormElementSetValue($Query, "This is Test : " & $a)
Next

My 2nd code tries to fill in all the collection of the form with Test and it's index. It fills in Title and Description but not the post section (textarea) part.

Help is much appreciated!

Regards,

Zepx

Edit: added #include

Edited by Zepx
Posted (edited)

I would just do a straight POST command to the page. With a little reverse-eng of the form and a XMLHTTP request object, you can pull it off without having to open a browser. I can provide an example.

Please do! :)

Edit: awww

Edited by FreeFry
Posted

I can't get the object to work right. :) Here's an example I did in vbscript, with "filtered" data.

CODE
Set objHTTP = CreateObject("Microsoft.XMLHTTP")

objHTTP.open "POST", "http://websitename/AssetMgntFrontend/Welcome", False

objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"

objHTTP.send "TARGETPAGE=DEFAULT&USERNAME=******&PASSWORD=******"

objHTTP.open "GET", "http://websitename/AssetMgntFrontend/main/REPORT?TARGETPAGE=&USERACTION=CommonAction_RunReport&ReportParameter_Id=10569", False

objHTTP.send

objHTTP.open "GET", "http://websitename/AssetMgntFrontend/main/REPORT?TARGETPAGE=RPTRESULTS&USERACTION=CommonAction_ReportResultsPageLoad", False

objHTTP.send

strData = objHTTP.responseText

Posted

You know.. I know this thing is really possible... Thatsgreat has successfully done it... I'm still waiting for an answer from him...

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
×
×
  • Create New...