Jump to content
Sign in to follow this  
bf2forlife

Collecting info from website

Recommended Posts

bf2forlife

How could this be done, lets say i wanna check weather from http://www.hs.fi/saa/ with autoit script. So whats the fastest way to do this? Or is this even possible? And no, i dont want to use shellexecute.

Share this post


Link to post
Share on other sites
DaleHohm

See the IE management section of the User Defined Functions in the helpfile. You will also find many many examples in this forum.

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

Share this post


Link to post
Share on other sites
Kiti
goldenix

I dont speak Finnish, but the basic idea is to search the webpage source code for setain text & if its there then do something:

#include <Array.au3> ; needed for arraydisplay othervise not needed to include

$URL = 'http://www.hs.fi/saa/'

    $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
    $oHTTP.Open("GET",$URL)
    $oHTTP.Send()
    $HTMLSource = $oHTTP.Responsetext

    $_Arrayline = StringSplit($HTMLSource, @LF) ; this is the Array $_Arrayline
    
    _ArrayDisplay($_Arrayline, "blaaa") ; is hire to show you the contents of the array, you can comment this out
    
        for $i = 1 to $_Arrayline[0] 
            If StringInStr($_Arrayline[$i],'<strong>Helsinki</strong>') Then    ; search Array line for text start from line 1 & end with line 0                
                
                If StringInStr( $_Arrayline[$i-7],'000.gif') Then  MsgBox(0,'Array Column 2 line: ' & $i ,$_Arrayline[$i-7] & @CRLF & 'Its a sunny day1')
                
                EndIf
                
        Next
Edited 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]

Share this post


Link to post
Share on other sites
bf2forlife

Thanks!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×