Sign in to follow this  
Followers 0
Wratislavian

notice changes

14 posts in this topic

a wannt to do script which will open defined site.

and it will be refresh site until script will "notice" that something was changed on this site. and then it will say time of that change.

hope i wrote it clear.

no need ready code just post me a few clues.

Share this post


Link to post
Share on other sites



Maybe run InetGetSize ( "URL" ) on that page every few seconds and if it changes size then something changed... Not best way. Or use InetGet and and do a file comparison... I wouldn't do this but every 30 seconds if I were you.


www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

You say you want a script that checks a certain website for changes by refreshing it, and than tells you when it was changed ??

yes something like that.

Share this post


Link to post
Share on other sites

cant find edit button ;p

better i show it

pic one:

Posted Image

pic two

Posted Image

what i want: i want to know when this things was changed.

Share this post


Link to post
Share on other sites

thanks for a tip

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

$link = InputBox("link", "insert session link", "www", "", -1, -1, 0, 0)


#include <IE.au3>
            Do
$oIE = _IECreate($link, 1)


            
;clock
            AdlibEnable("UpdateClock", 1000)
            While WinExists(_IEPropertyGet($oIE, "hwnd"))
            Sleep(10000)
            WEnd
            Exit
            Func UpdateClock()
            Local $curTime = "<b>Current Time is: </b>" & @HOUR & ":" & @MIN & ":" & @SEC
            _IEErrorNotify(False)
            Local $oAutoItClock = _IEGetObjByName($oIE, "AutoItClock")
            If Not IsObj($oAutoItClock) Then
            $oBody = _IETagNameGetCollection($oIE, "body", 0)
            _IEDocInsertHTML($oBody, "<div id='AutoItClock'></div>", "afterbegin")
            $oAutoItClock = _IEGetObjByName($oIE, "AutoItClock")
            _IEPropertySet($oAutoItClock, "innerhtml", $curTime)
            _IELoadWait($oIE)
            $sReferrer = _IEPropertyGet($oIE, "referrer")
            If $sReferrer Then _IEDocInsertText($oAutoItClock, _
            "  Referred by: " & $sReferrer, "afterend")
            Else
            _IEPropertySet($oAutoItClock, "innerhtml", $curTime)
            EndIf
            _IEErrorNotify(True)
;end clock

;load
_IELoadWait ($oIE)
;end load

;count links
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
send({ENTER})
For
Next
;end counting

            Until $iNumLinks = 1
EndFunc

ok so i made this.

do AutoIt can log $iNumLinks value into some txt file addind a date and time?

and what is wrong with this loop? [do -> until]

thanks in advance

Edited by Wratislavian

Share this post


Link to post
Share on other sites

$link = InputBox("link", "insert session link", "www", "", -1, -1, 0, 0)
#include <IE.au3>
            Do
 
            Func UpdateClock()

            Until $iNumLinks = 1

EndFunc

ok so i made this.

do AutoIt can log $iNumLinks value into some txt file addind a date and time?

and what is wrong with this loop? [do -> until]

You can't declare a function inside a loop, and you overlapped the EndFunc with Until, which is also wrong. By convention functions are declared at the bottom of a script and called up in the body.

I prefer the _FileWriteLog() function because it time-tags entries automatically.

:whistle:


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

Share this post


Link to post
Share on other sites

oook

thank you.

Share this post


Link to post
Share on other sites

#include <File.au3>
#include <IE.au3>


MsgBox(4096, "jak zdobyc link do sesji?", "mozilla -> galaktyka -> ustawiasz uklad -> prawy: -> pokaz info o stronie -> zakladka odnosniki -> szukasz <<pokaz>> -> prawy na to i kopiuj = mamy link do sesji")
$link = InputBox("made by Wrati", "wklep link do sesji, nacisnij ok i w ciagu 15 sekund podaj koordy ciekawego ukladu skrypt ruszy automatycznie ", "bedni to noob :)", "", -1, -1, 500, 500)
MsgBox(4096, "info", "od tego czasu nie klikaj nic, chyba ze krzyzyk zeby zamknac skrypt")

$oIE = _IECreate($link, 1)

;load
_IELoadWait ($oIE)
;end load

sleep(15000)

;count links
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
_FileWriteLog(@ScriptDir & '\Event.txt', $iNumLinks)


;end count


;____________________________


Do
send("{TAB 3}")
send("{ENTER 2}")
_IELoadWait ($oIE)
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
_FileWriteLog(@ScriptDir & '\Event.txt', $iNumLinks)
Until $iNumLinks = 1000

ok its almost done.

and i want to loop interupt in every 30 minutes and do the screenshot and after that go back to loop.

with screenshots i can handle but with pausing loop no.

Share this post


Link to post
Share on other sites

anyone:>

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

30 min. timer in that Do loop? Something like this maybe...

$last = TimerInit()
Do
send("{TAB 3}")
send("{ENTER 2}")
_IELoadWait ($oIE)
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
_FileWriteLog(@ScriptDir & '\Event.txt', $iNumLinks)
    If TimerDiff($last) > 1800000 Then
        ;insert some code to do screenshot here
        $last = TimerInit()
    EndIf
Until $iNumLinks = 1000
Edited by Siao

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

thanks Siao

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  
Followers 0