Sign in to follow this  
Followers 0
Jabberwock

post html?

10 posts in this topic

i was wondering, can autoit post html code?


Share this post


Link to post
Share on other sites



Post it where?

Share this post


Link to post
Share on other sites

Post it where?

I think he means posting html form data to a web server (CGI)

Share this post


Link to post
Share on other sites

http://www.eqrankings.com/add.php

i know you can do this with opening firefox or IE and having it typed in then pressing enter, but i was wondering if this can be done without using another program


Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

http://www.eqrankings.com/add.php

i know you can do this with opening firefox or IE and having it typed in then pressing enter, but i was wondering if this can be done without using another program

Easy. Check out IE.au3 in the beta. There are lots of examples in the helpfile and in the forum.

Dale

Edit: This will get you started...

#include <IE.au3>
$oIE = _IECreate("http://www.eqrankings.com/add.php")
$oForm = _IEFormGetObjByName($oForm, "add")
$oPid = _IEFormElementGetObjByName($oForm, "pid")
_IEFormElementSetValue($oPid, "your-pid")
_IEFormSubmit($oForm)
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

#6 ·  Posted (edited)

i don't seem to have IE.au3, and i am running the beta

^ Nvm, i just got the newest one

Edited by Jabberwock

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

#Include <Inet.au3>

$ThingToSubmit = "123"

$Submit = _InetGetSource("http://www.eqrankings.com/add.php?pid=" & $ThingToSubmit)

If @Error = 1 Or StringInStr($Submit, "Error") Then
    MsgBox(0, "Error", "Failed to submit data.")
ElseIf StringInStr($Submit, "You have successfully submited") Then
    MsgBox(0, "Success", $ThingToSubmit & " was successfully added to the database.")
EndIf

IE.au3 is over-rated :whistle:

Edited by Zib

Share this post


Link to post
Share on other sites

#Include <Inet.au3>
$Submit = _InetGetSource("http://www.eqrankings.com/add.php?pid=" & $ThingToSubmit)

This only works if the action page is written to parse the query text.

IE.au3 is over-rated :whistle:

Welcome to the forums -- I think you may be starting off on the wrong foot however.

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

it works for what i'm doing


Share this post


Link to post
Share on other sites

#Include <Inet.au3>
$Submit = _InetGetSource("http://www.eqrankings.com/add.php?pid=" & $ThingToSubmit)

This only works if the action page is written to parse the query text.

Welcome to the forums -- I think you may be starting off on the wrong foot however.

Dale

Sorry, it wasn't meant to bash you. I was just saying that there is circumstances that it can be done easier.

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