FinalVersion Posted March 24, 2010 Posted March 24, 2010 For example if I were to Google "Autoit", how can I check the first few results for "Autoit Script Home Page"? I'm sure this will require some html knowledge. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
goldenix Posted March 24, 2010 Posted March 24, 2010 Get the source, put it into array & search it for links/text, find link u need, & use INetGetSource again to get the source of that link. etc. etc. #include <inet.au3> HTMLSource = _INetGetSource('http://www.google.ee/search?q=autoit') $_Arrayline = StringSplit($HTMLSource, @LF) ;~ for $i = 1 to $_Arrayline[0] If StringInStr($_Arrayline[$i],'</title>') Then do something Next 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]
FinalVersion Posted March 24, 2010 Author Posted March 24, 2010 Thanks, but it doesn't appear to work very well. #include <inet.au3> $HTMLSource = _INetGetSource('http://www.google.com.au/search?q=autoit') $_Arrayline = StringSplit($HTMLSource, @LF) For $i = 1 To $_Arrayline[0] If StringInStr($_Arrayline[$i], "AutoIt Script") Then MsgBox(0, "", "!") EndIf Next Tried that, and it doesn't show a Message Box. And "AutoIt Script" is part of the second result for me. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
goldenix Posted March 24, 2010 Posted March 24, 2010 (edited) Thanks, but it doesn't appear to work very well. ... Tried that, and it doesn't show a Message Box. And "AutoIt Script" is part of the second result for me. replace it with consolewrite: If StringInStr($_Arrayline[$i], "AutoIt") Then ;MsgBox(0, "", "!") ConsoleWrite($_Arrayline[$i] & @CRLF) EndIf Edited March 24, 2010 by goldenix 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]
FinalVersion Posted March 24, 2010 Author Posted March 24, 2010 Nothing appears in console. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
goldenix Posted March 24, 2010 Posted March 24, 2010 (edited) Nothing appears in console. search for autoit not autoit script If StringInStr($_Arrayline[$i], "AutoIt") Then Edited March 24, 2010 by goldenix 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]
99ojo Posted March 24, 2010 Posted March 24, 2010 Hi, try this: #include <ie.au3> $oIe = _IECreate ('http://www.google.com.au/search?q=autoit', 0, 0) $HTMLSource = _IEBodyReadText ($oIe) _IEQuit ($oIe) $_Arrayline = StringSplit($HTMLSource, @LF) For $i = 1 To $_Arrayline[0] If StringInStr($_Arrayline[$i], "AutoIt Script") Then ConsoleWrite($_Arrayline[$i] & @CRLF) EndIf Next ;-)) Stefan
FinalVersion Posted March 24, 2010 Author Posted March 24, 2010 Thanks Stefan, but I'd rather no have to run ie to do this. @goldenix I'm searching for "AutoIt Script", and it's one of the results, your script doesn't work. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center]
goldenix Posted March 24, 2010 Posted March 24, 2010 (edited) I'm searching for "AutoIt Script", and it's one of the results, your script doesn't work. if you take your time & look the the source you will notice that sometimes you need to search for <em>AutoIt</em> Script instead of AutoIt Script of course you can simply do: $HTMLSource = StringReplace($HTMLSource,'<em>','') $HTMLSource = StringReplace($HTMLSource,'</em>','') $_Arrayline = StringSplit($HTMLSource, @LF) ;~ for $i = 1 to $_Arrayline[0] If StringInStr($_Arrayline[$i], "AutoIt script") Then ConsoleWrite($_Arrayline[$i] & @CRLF) etc... Edited March 24, 2010 by goldenix 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]
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