fielmann Posted March 28, 2008 Share Posted March 28, 2008 (edited) What I need is to communicate with a webserver: 1) start communication 2) enter username 3) enter password 4) check that login was correct Thats all. Can I make that without (embeded) IE? I think I could realize that with TCP commands? Edited March 28, 2008 by fielmann Link to comment Share on other sites More sharing options...
d4rk Posted March 28, 2008 Share Posted March 28, 2008 i suggest using _IE* [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
fielmann Posted March 28, 2008 Author Share Posted March 28, 2008 i suggest using _IE*I need a plain and basis method.Is it possible without _IE ? Link to comment Share on other sites More sharing options...
zackrspv Posted March 28, 2008 Share Posted March 28, 2008 (edited) I need a plain and basis method. Is it possible without _IE ? But, it's just so simple with _IE: expandcollapse popupFunc goCheckID() ProgressOn("Checking credentials", "Checking credentials...") ProgressSet("5", "Connecting to server...") $ocheckID = _IECreate("http://KB.mysite.com/login.aspx", 0, 0, 1, 1) ;- grab a collection of form details $oFormID = _IEFormGetCollection($ocheckID, 0) ;- grab the login box $oQueryID = _IEFormElementGetCollection ($oFormID, 1) ;- set the value of login box _IEFormElementSetValue ($oQueryID, $username) ;- grab the password box $oQueryID = _IEFormElementGetCollection ($oFormID, 2) ;- set the value of the password box _IEFormElementSetValue ($oQueryID, $password) ;- grab the login button $loginID = _IEGetObjByName($ocheckID, "ucUserLogin:_ctl3") ;- click the login button ProgressSet("10", "Logging in....") _IEAction($loginID, "click") _IELoadWait($ocheckID) ;- evaluate the source $sHTMLid = _IEDocReadHTML($ocheckID) if StringInStr($sHTMLid, "Username and password not found!", 0) Then _IEQuit($ocheckID) progressoff() MsgBox(0, "error", "invalid username/password") call("goGetID") Else ProgressOff() _IEQuit($ocheckID) EndIf EndFunc Edited March 28, 2008 by zackrspv -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
fielmann Posted March 28, 2008 Author Share Posted March 28, 2008 But, it's just so simple with _IE: expandcollapse popupFunc goCheckID() ProgressOn("Checking credentials", "Checking credentials...") ProgressSet("5", "Connecting to server...") $ocheckID = _IECreate("http://KB.mysite.com/login.aspx", 0, 0, 1, 1) ;- grab a collection of form details $oFormID = _IEFormGetCollection($ocheckID, 0) ;- grab the login box $oQueryID = _IEFormElementGetCollection ($oFormID, 1) ;- set the value of login box _IEFormElementSetValue ($oQueryID, $username) ;- grab the password box $oQueryID = _IEFormElementGetCollection ($oFormID, 2) ;- set the value of the password box _IEFormElementSetValue ($oQueryID, $password) ;- grab the login button $loginID = _IEGetObjByName($ocheckID, "ucUserLogin:_ctl3") ;- click the login button ProgressSet("10", "Logging in....") _IEAction($loginID, "click") _IELoadWait($ocheckID) ;- evaluate the source $sHTMLid = _IEDocReadHTML($ocheckID) if StringInStr($sHTMLid, "Username and password not found!", 0) Then _IEQuit($ocheckID) progressoff() MsgBox(0, "error", "invalid username/password") call("goGetID") Else ProgressOff() _IEQuit($ocheckID) EndIf EndFunc hello? anybody @ home? I don't want to use it Link to comment Share on other sites More sharing options...
zackrspv Posted March 28, 2008 Share Posted March 28, 2008 hello?anybody @ home? I don't want to use it Well,That really wasn't my point. But it's okay if you don't understand that. My point was: It's simple, it's clean, and it's pretty darned quick. Why would you not want to use what's already there.Sure, you can write one using TCP functions, but that would take forever.You want to connect to a webserver, so in reality, you need some sort of 'browser' which can understand webserver messages; ie _IE functions. Just seems simple to me lol -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
fielmann Posted March 28, 2008 Author Share Posted March 28, 2008 Well,That really wasn't my point. But it's okay if you don't understand that. My point was: It's simple, it's clean, and it's pretty darned quick. Why would you not want to use what's already there.Sure, you can write one using TCP functions, but that would take forever.You want to connect to a webserver, so in reality, you need some sort of 'browser' which can understand webserver messages; ie _IE functions. Just seems simple to me lolI need a fast solution!Direct TCP functions are faster than slow IE functions.Any idea how to realize 1st TCP communication? Link to comment Share on other sites More sharing options...
zackrspv Posted March 28, 2008 Share Posted March 28, 2008 (edited) I need a fast solution!Direct TCP functions are faster than slow IE functions.Any idea how to realize 1st TCP communication?Best thing i can tell you; aside from programming everything like you want directly in TCP will be a long drawn out process, is to take a look at this post:http://www.autoitscript.com/forum/index.php?showtopic=20589 Edited March 28, 2008 by zackrspv -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. 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