c4mpi Posted March 2, 2010 Share Posted March 2, 2010 (edited) $a_b = _IEAttach("Untitled Document") $a_sMyString = "caught" $a_oLinks = _IELinkGetCollection($a_b) For $a_oLink in $a_oLinks $a_sLinkText = _IEPropertyGet($a_oLink, "innerText") If StringInStr($a_sLinkText, $a_sMyString) Then Sleep(Random(200000, 220000) EndIf Next I get the error: For $a_oLink in $a_oLinks For $a_oLink in $a_oLinks^ ERROR Error: Variable must be of type "Object". Why? Edited March 2, 2010 by c4mpi Link to comment Share on other sites More sharing options...
trancexx Posted March 2, 2010 Share Posted March 2, 2010 What motivated you to share that information with the community? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
c4mpi Posted March 2, 2010 Author Share Posted March 2, 2010 What motivated you to share that information with the community?What motivated you to reply? Link to comment Share on other sites More sharing options...
kaotkbliss Posted March 2, 2010 Share Posted March 2, 2010 What motivated you to reply?what motivated me to read this?(i don't even know what that code is supposed to do) 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
bogQ Posted March 2, 2010 Share Posted March 2, 2010 (edited) @c4mpi I think i tolded you on some your previous topic that _IEAttach wokrs with IE I see heare that your trying to attach to ("Untitled Document") and noone have slightest idea is that some tupe of page, document or program. So we need more info. I can tell that you probably have on your script 3 errors First is, probably _IEAttach("Untitled Document") Second is, no "If @error Then" on _IELinkGetCollection func And the third is, "Sleep(Random(200000, 220000)" shud b "Sleep(Random(200000, 220000))" #include <IE.au3> _IECreate("http://www.google.com/search?hl=sr&rls=com.microsoft%3Asr&q=caught&btnG=%D0%9F%D1%80%D0%B5%D1%82%D1%80%D0%B0%D0%B6%D0%B8&lr=&aq=null&oq=") $a_b = _IEAttach("caught - Google") $a_sMyString = "caught" $a_oLinks = _IELinkGetCollection($a_b) If @error Then MsgBox(0,"","ERROR") Else For $a_oLink in $a_oLinks $a_sLinkText = _IEPropertyGet($a_oLink, "innerText") If StringInStr($a_sLinkText, $a_sMyString) Then MsgBox(0,"Gona Go Sleep Noy","Cy"&@CRLF&"ZZzzZzzZZZZzzzzzzZzzz") Sleep(Random(200000, 220000)) EndIf Next EndIf Edited March 2, 2010 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...
PsaltyDS Posted March 2, 2010 Share Posted March 2, 2010 So $a_oLinks is not the collection you expected it to be. Add _IEErrorHandlerRegister() to the top of your script and run it in SciTE to get more diagnostic information. Also test @error after _IELinkGetCollection() before trying to use the collection. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
trancexx Posted March 2, 2010 Share Posted March 2, 2010 What motivated you to reply?Stupidness of your post.If you didn't get that then you are either stupid too, or just pretending to be. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
c4mpi Posted March 2, 2010 Author Share Posted March 2, 2010 Okey thanks for help, sorry for zero information. 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