VVDOOM Posted January 18, 2012 Share Posted January 18, 2012 Here is the function I have that runs when i click the button. i used a sample web page in this example, it is not the page ill need to scan, but if i can learn how to scan a page ill be one step closer to doing what I need to do. It pulls up the messag box but there is only a 0 in the message box.. so not sure what is going wrong.. i also tried putting in $url instead of $oIE but still only the 0 shows up. If anyone can assist it would be greatly appreciated... ---------------------------------------------------------- Func ButtonFunction1() $url = "http://www.n17.com/" $oIE = _IEAttach ("Network 17 - Windows Internet Explorer") $sHTML = _IEDocReadHTML ($oIE) MsgBox(0, "DUH", $sHTML) EndFunc ---------------------------------------------------------- THANKS.. Link to comment Share on other sites More sharing options...
Xenobiologist Posted January 18, 2012 Share Posted January 18, 2012 #Region ;************ Includes ************ #Include <IE.au3> #EndRegion ;************ Includes ************ $sUsername = "First" $sPassword = "Last" $sUrl = "http://www.n17.com/" $oIE = _IECreate($sUrl, 0, 1, 0, 1) $oHWND = _IEPropertyGet($oIE, "hwnd") WinSetState($oHWND, "", @SW_MAXIMIZE) $oForm = _IEFormGetCollection($oIE, 2) $oUsername = _IEFormElementGetObjByName($oForm, 'fname') $oPassword = _IEFormElementGetObjByName($oForm, "lname") _IEFormElementSetValue($oUsername, $sUsername) _IEFormElementSetValue($oPassword, $sPassword) $sHTML = _IEDocReadHTML ($oIE) ;~ _IEFormSubmit($oForm) MsgBox(0, "DUH", $sHTML) Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
VVDOOM Posted January 18, 2012 Author Share Posted January 18, 2012 Sorry but that just did not work... what is that last name, first name, form element??? I need to read the web page, dump the source to the message box.. once i can do that, then i can play with the info in the string, pull out what i am looking for.. Thanks for any assistance... Link to comment Share on other sites More sharing options...
bogQ Posted January 18, 2012 Share Posted January 18, 2012 (edited) #include <IE.au3> $url = 'http://www.n17.com/' $oIE = _IEAttach ($url,'URL') $sHTML = _IEDocReadHTML ($oIE) MsgBox(0, "DUH", $sHTML)1)if your using or need to use name of documents title as string try_IEAttach ('Network 17')and not_IEAttach ('Network 17 - Windows Internet Explorer')why?!!sub-string of main document title, so this is document title and not win title2)if you do need to use full title or part of title as wintitle use it as_IEAttach ('Network 17 - Windows Internet Explorer','WindowTitle')3)newer the less i think that 'URL' in upper code is nice solution 4 ithope its all clear? Edited January 18, 2012 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
VVDOOM Posted January 18, 2012 Author Share Posted January 18, 2012 thank you very much, that scanned the page, put the source code into $sHTML... now i can work on the rest of the code, which i may ask questions about later.. THANKS!!! This is a great group of people here.... Surely Karma will be awarded to everyone helping others.. 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