jokke Posted February 17, 2008 Posted February 17, 2008 I guess you could read page source. Note iwe not tested this code, and you need to edit _StringBetween to your fit. #include <string.au3> $oIE = _IECreate("edit to your address here",1,1) $Source = _IEDocReadHTML($oIE) $return = _StringBetween($Source,"static text before what you need to know","static text after what you need to know") ;If everything went right this should work, and should output what you need inn console. ConsoleWrite($return[0]&@CRLF) UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
AL3X Posted February 17, 2008 Author Posted February 17, 2008 (edited) -- Edited July 2, 2015 by AL3X
jokke Posted February 17, 2008 Posted February 17, 2008 (edited) Replace with this: $return = _StringBetween($Source,"<big><big><big>","</big></big></big>") Edited February 17, 2008 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
AL3X Posted February 17, 2008 Author Posted February 17, 2008 (edited) -- Edited July 2, 2015 by AL3X
DaleHohm Posted February 17, 2008 Posted February 17, 2008 Nothing wrong with _IEDocReadHTML, but it returns more than you need. Suggest _IEBodyReadHTML Check the string returned... it may not be what you expect... most likely because you may need to dig into Frames with the _IEFrame* functions first... 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
FreeFry Posted February 17, 2008 Posted February 17, 2008 If I remember correctly, is there not a way to execute a javascript command and get the result back into autoit? I have a memory of someone doing that with the internet explorer object.. If that's possible then you could just run the javascript function I guess...
jokke Posted February 17, 2008 Posted February 17, 2008 If stringbetween returns anything its return is returned inn an array. MsgBox(0, "asjhsj", $return[0]) ;if everything did work as intended this should work. UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
AL3X Posted February 17, 2008 Author Posted February 17, 2008 (edited) -- Edited July 2, 2015 by AL3X
FreeFry Posted February 17, 2008 Posted February 17, 2008 (edited) FreeFry said: If I remember correctly, is there not a way to execute a javascript command and get the result back into autoit? I have a memory of someone doing that with the internet explorer object.. If that's possible then you could just run the javascript function I guess... Ah, found it, I'd say this is way more reliable: $oIE = _IECreate("http://rs116.rapidshare.com/files/57686902/Cap1788.rar",1,1) ; creats object, goes to url $oIE.Navigate("java script:void(document.forms[0].elements[1].click())") ; clicks the "Free" button _IELoadWait($oIE, 1000, 5500) ; waits untill the page has loaded, waiting one second. Do $a = $oIE.document.parentwindow.eval("d.toFixed(1)") ; this gets the time left by executing the javascript code the site uses(this approach is way better than reading the html imo.) ConsoleWrite("Time left: " & $a & @LF) Sleep(250) Until $a <= 0 MsgBox(0, "Hurray", "Download is ready!")oÝ÷ Ù8b²+)®Ún§¢Ýtѧº¶y«-ëbé^~Ûaz yج¦V²²+"h§º×¬jwHq¶¡Ø ~êíêâÚ-ë"µë#jö¬r¸©µÊz¸ ÙèÂÚwmç±iËmg«Ø¬ºÈ§»Û!¢é]mêh²Èçè®j+y§º¶É±ßÛ:B%çHr¥u·®ÇZºÚ"µÍÚ[ÛYH ÚYK]LÉÝÂÚ[ÛYH ÜÝ[Ë]LÉÝÂÌÍÛÒQHHÒQPÜX]J ][ÝÚËÜÌLMYÚKÛÛKÙ[ËÍMÍ LÐØMÎ][ÝËKJBÌÍÛÒQK]YØ]J ][ÝÚ]HØÜÚY ØÝ[Y[ÜÖÌK[[Y[ÖÌWKÛXÚÊ JI][ÝÊBÒQSØYØZ] ÌÍÛÒQKL ML BÂIÌÍØHH ÌÍÛÒQKØÝ[Y[[Ú[ÝË][ ][ÝØÉ][ÝÊBPÛÛÛÛUÜ]J ][ÝÕ[YHY ][ÝÈ [È ÌÍØH [ÈBTÛY L B[[ ÌÍØH ÏHÙÐÞ ][ÝÒ^I][ÝË ][ÝÑÝÛØYÈXYIÌÌÎÉ][ÝÊ apparently the timer is stored as a variable named c. lol Edited February 17, 2008 by FreeFry
AL3X Posted February 17, 2008 Author Posted February 17, 2008 (edited) -- Edited July 2, 2015 by AL3X
FreeFry Posted February 17, 2008 Posted February 17, 2008 (edited) AL3X said: $Ventana = _IECreate ($LINE) $Free = _IEGetObjByName ($Ventana, "dl.start", 1) _IEAction ($Free, "click") _IELoadWait ($Ventana) $Source = _IEDocReadHTML($Ventana) $return = _StringBetween($Source,"<big><big><big>","</big></big></big>") $Espera = ($return[0] * 60000 + 10000) Sleep($Espera)oÝ÷ ØZ½ëaƧv+lÂäxwí7èK)z¶°j+bÊZ+!Á¨²Ø^¶)ën®w~º&Ó~«zÛ«ít±ç-¡·¬êÞ¶¶¢¨Â+¬¶Þ8$wõçb¶Éhi×þ«¨µäájÝý²ËbYèµ§º¶zØhºHyØyÙ²¦-Â+ajw±jjezØZ¶ßÛ-ç±iËmg¢Ç¢wlçíº{bØ^v'ÊÞiÜyÆ®±ëa{¥¨±¬¬Ýý³M&{zÉ^~Ü!zxßÛ,¶)eÞ¶§æÇ¢wlçí2)ÞßÛ&¢·«zXnWÜ(mz÷«+,ëb·lÊ«r"qáÓ"ì(ºWi®Únyö¬µêí¢§vW¬±Ê{*.ÊzjøvéízË^u«¢+ØÀÌØíY¹Ñ¹ô}% ÉÑ ÀÌØí1%9¤(ÀÌØíÉô}%Ñ=© å9µ ÀÌØíY¹Ñ¹°ÅÕ½Ðí°¹ÍÑÉÐÅÕ½Ðì°Ä¤(}%Ñ¥½¸ ÀÌØíɰÅÕ½Ðí±¥¬ÅÕ½Ðì¤(}%1½]¥Ð ÀÌØíY¹Ñ¹¤(M±À ÀÌØí½%¹½Õµ¹Ð¹ÁɹÑÝ¥¹½Ü¹Ù° ÅÕ½ÐíÅÕ½Ð줨ÄÀÀÀ Edited February 17, 2008 by FreeFry
AL3X Posted February 17, 2008 Author Posted February 17, 2008 (edited) -- Edited July 2, 2015 by AL3X
FreeFry Posted February 17, 2008 Posted February 17, 2008 AL3X said: Ok I'll try it Thanks Hope it works.
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