Sign in to follow this  
Followers 0
Ic3c0ld

Post Request Help

14 posts in this topic

But can anyone point me in the right direction for the syntax on sending a HTML Post Request. That usually orignates fro ma form. it has a couple input boxes and am not sure how to accomplish this directly from AutoIT. Any help would be greatly appreciated

Share this post


Link to post
Share on other sites



The Navigate and Navigate2 methods of the InternetExplorer.Application opject allow you to pass this data (documentation at msdn.microsoft.com).

Another common way to do it is to write out your own HTML on the fly, fill the form and submit it. This can be done with IE.au3 and can even be done with an invisible window.

Dale

But can anyone point me in the right direction for the syntax on sending a HTML Post Request. That usually orignates fro ma form. it has a couple input boxes and am not sure how to accomplish this directly from AutoIT. Any help would be greatly appreciated


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

Share this post


Link to post
Share on other sites

The Navigate and Navigate2 methods of the InternetExplorer.Application opject allow you to pass this data (documentation at msdn.microsoft.com).

Another common way to do it is to write out your own HTML on the fly, fill the form and submit it. This can be done with IE.au3 and can even be done with an invisible window.

Dale

Which In your opinion will be more efficient?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

That depends on what you mean by "efficient". For me, that means how could I get results the quickest -- and for me that would be the later option. If you mean what would take the fewest CPU cycles to accomplish, then that would probably be the former (and perhaps some other options we haven't discussed).

To use the later, you can use IE.au3 -- here's a sketch of the code required...

#include <IE.au3>
$oIE = _IECreate()
$sHTML = "<form name=foo method=post action=http://bar.com/bar.htm>"
$sHTML = $sHTML & "...text fields...  ...buttons...</form>"
_IEBodyWriteHTML($oIE, $sHTML)
$oForm = _IEFormGetObjByName($oIE, "foo")

then get object references to the form elements(_IEFormElementGetObjByName), then set the values(_IEFormElementSetValue), then submit the form (_IEFormSubmit).

Dale

Which In your opinion will be more efficient?

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

Share this post


Link to post
Share on other sites

Thanks for the input but I went with just going to the site and doing everything. Its really slow diong that but it has a lot shit to mess with. Now just need to figure out how to block images in iexplore.

Share this post


Link to post
Share on other sites

can you tell us the name of the site you want to send info to??

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Its a myspace script i am recoding.

Ya it will definatley have to have the images blocked and javascript and java. I am not sure how to do this though in IExplore. Javascript gone would disable soem of their adds because they are insterted with javascript or java. Any suggestions?

Edited by Ic3c0ld

Share this post


Link to post
Share on other sites

try to explain a little... is this the idea

you have already created the replacement html and you want to post it with autoit to your myspace webpage.... or ?

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Oh no its a friend adder. It goes and adds massive amounts of friends to your list. Right now myspace well who am I kidding myspace has always been a bandwidth whore and the javascript ads and tons of images and poorly designed layout are getting in the way of my dial up load times to actually send the post request. I have the sleep time perfect for if their wree no images if i add more time it will be to long to wait for one page. Anything else?

Share this post


Link to post
Share on other sites

If the images comes from a predictable source, you could use a trick of editing your host file (c:\windows\system32\drivers\etc\hosts) and redefine the host to point to localhost with entries like this:

127.0.0.1 ad.doubleclick.net

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

Share this post


Link to post
Share on other sites

Seconded on the host file trick

I got it i just used Internet Explorers Built in Custom Style Sheet Formatting and i loaded a style sheet like this

IMG { display: none !important;}

And ie removed all the pictuers ;).

Share this post


Link to post
Share on other sites

I got it i just used Internet Explorers Built in Custom Style Sheet Formatting and i loaded a style sheet like this

IMG { display: none !important;}

And ie removed all the pictuers :).

Do correct me if I am wrong on this but aren't images deleted after the page is complete so therefore your not doing anything except for deleting the picture for easier viewing. Using CSS isn't the right way for accomplishing this task if you want speed by reducing the downloading of images (all same goes for Audio and Flash). I am unsure how to accomplish this task directly with IE.au3 but you can use INet.au3 and download the page and edit the file by taking out the given things. Else you could use HTTP.au3 and edit your own head to give you it in Accept: *.html *.htm with withdrawal from .img or any other flag you want banned.

However the host file option does work but then it carries it over to any site (don't know if you want this or not)


0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Share this post


Link to post
Share on other sites

Do correct me if I am wrong on this but aren't images deleted after the page is complete so therefore your not doing anything except for deleting the picture for easier viewing. Using CSS isn't the right way for accomplishing this task if you want speed by reducing the downloading of images (all same goes for Audio and Flash). I am unsure how to accomplish this task directly with IE.au3 but you can use INet.au3 and download the page and edit the file by taking out the given things. Else you could use HTTP.au3 and edit your own head to give you it in Accept: *.html *.htm with withdrawal from .img or any other flag you want banned.

However the host file option does work but then it carries it over to any site (don't know if you want this or not)

I found a good starter for you one per page or site or anything you would want to block on images it can be found at http://www.autoitscript.com/forum/index.ph...19370&st=30


0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

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