Sign in to follow this  
Followers 0
Zepx

Problem With

6 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Share this post


Link to post
Share on other sites

#3 ·  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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Problem solved, thanks to all who helped.

Share this post


Link to post
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
Sign in to follow this  
Followers 0