Jabberwock Posted August 11, 2006 Share Posted August 11, 2006 i was wondering, can autoit post html code? Link to comment Share on other sites More sharing options...
BPBNA Posted August 11, 2006 Share Posted August 11, 2006 Post it where? Link to comment Share on other sites More sharing options...
Fargo Posted August 11, 2006 Share Posted August 11, 2006 Post it where?I think he means posting html form data to a web server (CGI) Link to comment Share on other sites More sharing options...
Jabberwock Posted August 11, 2006 Author Share Posted August 11, 2006 http://www.eqrankings.com/add.phpi 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 Link to comment Share on other sites More sharing options...
DaleHohm Posted August 12, 2006 Share Posted August 12, 2006 (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 programEasy. 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 August 12, 2006 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 Link to comment Share on other sites More sharing options...
Jabberwock Posted August 12, 2006 Author Share Posted August 12, 2006 (edited) i don't seem to have IE.au3, and i am running the beta ^ Nvm, i just got the newest one Edited August 12, 2006 by Jabberwock Link to comment Share on other sites More sharing options...
Zib Posted August 12, 2006 Share Posted August 12, 2006 (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 Edited August 12, 2006 by Zib Link to comment Share on other sites More sharing options...
DaleHohm Posted August 12, 2006 Share Posted August 12, 2006 #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 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 Link to comment Share on other sites More sharing options...
Jabberwock Posted August 12, 2006 Author Share Posted August 12, 2006 it works for what i'm doing Link to comment Share on other sites More sharing options...
Zib Posted August 12, 2006 Share Posted August 12, 2006 #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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now