goldenix Posted November 19, 2007 Share Posted November 19, 2007 Hi this is my little problem,I want open page, get link collection, & then navigate to the link, next check if the link is dead(search body for a keyword1 & Keyword2 if found = link dead)now all this works exept for the search forthe keywords via StringInStr. if I do it in a separate script then it works but if i try to navigate, then autoit gives a false answer. & this error--> IE.au3 Error from function _IEBodyReadText, $_IEStatus_InvalidDataTypeIf you run the code, it must display the MSGbox..but it wontProblem spot:;============================================================================= For $a = 1 To 2 $oBOdy = _IEBodyReadText($oIE_) If StringInStr($oBody,GUICtrlRead($Input_search[$a])) Then MsgBox(0, "message", "Link DEAD") EndIf Next ;=============================================================================oÝ÷ Ø[¥Êy«¢+Ø¥¹±Õ±ÐíU% ½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±Ðí%¹ÔÌÐì((I¥½¸MQIP-½U$ÍÑ¥½¸½É´ô(ÀÌØí½É´ÄôU% ÉÑ ÅÕ½Ðí½É´ÄÅÕ½Ðì°ØÌÌ°ÐÔаÄäÌ°ÄÄÔ¤(ÀÌØí ÕÑѽ¸ÄôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ÕÑѽ¸ÄÅÕ½Ðì°ÈÀÀ°ÄØà°ÄØä°Ðä°À¤()¥´ÀÌØí%¹ÁÕÑ}ÍÉ¡lÍt(ÀÌØí%¹ÁÕÑ}ÍÉ¡lÅtôU% Ñɱ ÉÑ%¹ÁÕÐ Ìäí¥±¹½Ð½Õ¹Ìäì°ÈÈ°àÀ°ÈÐÄ°È̤(ÀÌØí%¹ÁÕÑ}ÍÉ¡lÉtôU% Ñɱ ÉÑ%¹ÁÕÐ Ìäí½Õ¹Ìäì°ÈÈ°ÄÄÜ°ÈÐÄ°È̤()U%MÑMÑÑ¡M]}M!=¤(¹I¥½¸9-½U$ÍÑ¥½¸()]¡¥±Ä($ÀÌØí¹5ÍôU%Ñ5Í ¤(%MÝ¥Ñ ÀÌØí¹5Í($% ÍÀÌØíU%}Y9Q} 1=M($$%á¥Ð($% ÍÀÌØí ÕÑѽ¸Ä((íÕµµäÝ¥±°ÕÍ¥ÐѼ¹Ù¥ÑѼ¸(ÀÌØí½%ô}% ÉÑ Ìäí½ÕÐé±¹¬Ìäì°À°Ä°Ä¤$$íÑÑ °Ù¥Í¥±°]¥Ð(($ÀÌØí½%Èô}% ÉÑ Ìäí¡ÑÑÀè¼½¥ÉÙ¥¼¹½´¼ÈÀÀܼÀä¼Äܽ½É½±}±Ù|É}½É½ÍÑ}Í¥µå}}Ñ¡}±¥½¹}¥¹}¥¥}Í¥µÍ}ÁÉ¥|Äää๡ѵ°Ìäì°À°Ä°Ä¤ìÉѵ¥¸UI0$$($ÀÌØí½1¥¹Ìô}%1¥¹Ñ ½±±Ñ¥½¸ ÀÌØí½%Ȥ콱±Ð±¥¹Ìɽ´UI0½Ù($ÀÌØí¥9Õµ1¥¹Ìôáѹ(($$%½ÈÀÌØí½1¥¹¬%¸ÀÌØí½1¥¹Ì($$$%%MÑÉ¥¹%¹MÑÈ ÀÌØí½1¥¹¬¹¡É°ÌäíÉÁ¥Í¡É¹½´Ìäì¤Q¡¸ì¥±¥¹¬¡ÌÑ¡¥ÌÑáÐ¥¹Í¥°Ñ¡¸Ð¥Ð($$$$ÀÌØíIÁ±}Ñ¡}ÍÑÉ¥¹ôMÑÉ¥¹IÁ± ÀÌØí½1¥¹¬¹¡É°Ìäí-¥¹Ìäì°ÅÕ½ÐìÅÕ½Ðì¤íIµ½Ù-¥¹É½´±¥¹¬Ñ¼Í¥µÕ±Ñɽ¸±¥¹¬(($$$$$ÀÌØí½%Ìô}%9Ù¥Ñ ÀÌØí½%°ÀÌØíIÁ±}Ñ¡}ÍÑÉ¥¹°Ä¤ì9Ù¥ÑѼUI0Ѽ¡¬¥±¥¹¬¥Ìɽ¸$$$$$$(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô($$$$$íøÑ¡¥ÌÍÑ¥½¸±½¹ÌѼÍÉ ±¥¹ÌÍÑ¥½¸($$$$%½ÈÀÌØíôÄQ¼È$($$$$$$ÀÌØí½ =äô}% ½åIQáÐ ÀÌØí½%̤$$($$$$$%%MÑÉ¥¹%¹MÑÈ ÀÌØí½ ½ä±U% ÑɱI ÀÌØí%¹ÁÕÑ}ÍÉ¡lÀÌØít¤¤Q¡¸($$$$$$$($$$$$$%5Í ½à À°ÅÕ½ÐíµÍÍÅÕ½Ðì°ÅÕ½Ðí1¥¹¬ÅÕ½Ðì¤($$$$$$$($$$$$%±Í(($$$$$%¹%($$$$%9áÐ(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô($$$%¹%($$%9áÐ($%}%EեРÀÌØí½%¤($%}%EեРÀÌØí½%Ȥ(%¹MÝ¥Ñ )]¹ My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] Link to comment Share on other sites More sharing options...
Generator Posted November 19, 2007 Share Posted November 19, 2007 (edited) Try this expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> #Region ### START Koda GUI section ### Form= $AForm1 = GUICreate("AForm1", 633, 454, 193, 115) $Button1 = GUICtrlCreateButton("Button1", 200, 168, 169, 49, 0) Dim $Input_search[3] $Input_search[1] = GUICtrlCreateInput('File not found', 22, 80, 241, 23) $Input_search[2] = GUICtrlCreateInput('found', 22, 117, 241, 23) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ;dummy will use it to navigate to. $oIE = _IECreate ('about:blank',0,1,1) ;attach, visible, Wait $oIE2 = _IECreate ('http://dirvideo.com/2007/09/17/korol_lev_2_gordost_simby__the_lion_king_ii_simbas_pride_1998.html',0,1,1); create main URL $oLinks = _IELinkGetCollection ($oIE2); collect links from URL above $iNumLinks = @extended For $oLink In $oLinks If StringInStr($oLink.href ,'rapidshare.com') Then; if link has this text inside, then get it $Replace_the_string = StringReplace($oLink.href,'King', "");Remove King from link to simulate broken link _IENavigate ($oIE,$Replace_the_string,1); NAvigate to URL to check if link is broken ;============================================================================= ;~ this section belongs to search dead links section For $a = 1 To 2 $oBOdy = _IEBodyReadText($oIE) If StringInStr($oBody,GUICtrlRead($Input_search[$a])) Then MsgBox(0, "message", "Link DEAD") Else EndIf Next ;============================================================================= EndIf Next _IEQuit($oIE) _IEQuit($oIE2) EndSwitch WEnd Edited November 19, 2007 by Generator Link to comment Share on other sites More sharing options...
goldenix Posted November 19, 2007 Author Share Posted November 19, 2007 Try this Damn This was so simple. Thanx, all seems to be working perfectly now. My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list] 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