Sign in to follow this  
Followers 0
myspacee

Monitor html page

16 posts in this topic

#1 ·  Posted (edited)

Hello to all,

see in past times some script capable to 'monitor' given link, anyone remember some functions ?

thank you,

m.

Edited by myspacee

Share this post


Link to post
Share on other sites



Here is idea, structure, It should look like this:

while 1

$old = FileRead(InetGet())

while 2

IF Not FileRead(InetGet()) = $old Then

_doSomething()

exitloop

EndIf

wend

wend

or just

$old = FileRead(InetGet())

while 2

IF Not FileRead(InetGet()) = $old Then

_doSomething()

exitloop

EndIf

wend

NB! its not working solution, but it's template for your project


edited

Share this post


Link to post
Share on other sites

ok, and remember also a function that returns all link on a given page...

anyone please?

m.

Share this post


Link to post
Share on other sites

its not that easy, but u can use StringInStr() to move to html tag that is used for link,then you can use stringleft() or stringright or stringtrimleft() or stringtrimright() you actually need to combine these commands.

it should look like

While 1

StrinInStr();search for link tags

if @error then

exitloop ;stop collecting links when script reaches end of file

endif

;type your other commands here

Wend


edited

Share this post


Link to post
Share on other sites

Just a guess here

$o_IE = _IECreate("http://maps.google.it/maps/mpl?layer=c&moduleurl=http:%2F%2Fmaps.google.com%2Fmapfiles%2Fmapplets%2Fsv%2Feul%2Ftutorial_it.xml&ie=UTF8&cbll=41.902365,12.458378&panoid=j09L3Jj9iEehXuGRMBp7Ag&cbp=12,274.46,,0,5&ll=41.902277,12.45856&spn=0,359.980774&z=16")

$Info = _IEPropertyGet($o_IE, "locationurl") 

MsgBox(4096, "Info", $Info)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

thank you for reply Val,

script return again link :

http://maps.google.it/maps/mpl?layer=c&amp...980774&z=16

Is there any possibility to 'record' any other info about actual visited page ?

Try to explain better.

I embed an IE session in a GUI (google street view)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)

Example()

; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI
;
; See also: http://msdn.microsoft.com/workshop/browser...netexplorer.asp
Func Example()
    Local $oIE, $GUIActiveX, $GUI_Button_Back, $GUI_Button_Forward
    Local $GUI_Button_Home, $GUI_Button_Stop, $msg
  
    $oIE = ObjCreate("Shell.Explorer.2")

  ; Create a simple GUI for our output
    GUICreate("Embedded Web control Test", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
    $GUIActiveX = GUICtrlCreateObj ($oIE, 10, 40, 600, 360)
    $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
    $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
    $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
    $GUI_Button_Stop = GUICtrlCreateButton("Stop", 330, 420, 100, 30)

    GUISetState()    ;Show GUI

    $oIE.navigate("http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=monumental,+barcelona&sll=40.396764,-3.713379&sspn=14.981433,26.806641&ie=UTF8&z=17&layer=c&cbll=41.399132,2.181214&panoid=uYyB2cKbf4DEdnYgWwcflw&cbp=12,59.59078357976048,,0,6.475409836065572")

  ; Waiting for user to close the window
    While 1
        $msg = GUIGetMsg()

        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $GUI_Button_Home
                $oIE.navigate("http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=monumental,+barcelona&sll=40.396764,-3.713379&sspn=14.981433,26.806641&ie=UTF8&z=17&layer=c&cbll=41.399132,2.181214&panoid=uYyB2cKbf4DEdnYgWwcflw&cbp=12,59.59078357976048,,0,6.475409836065572")
            Case $msg = $GUI_Button_Back
                $oIE.GoBack
            Case $msg = $GUI_Button_Forward
                $oIE.GoForward
            Case $msg = $GUI_Button_Stop
                $oIE.Stop
        EndSelect
      
    WEnd

    GUIDelete()
EndFunc ;==>Example

My user has lot of link on this page (full screen, mail send, etc...)

I want to find this links on pages and if possible which is last visited link.

This to 'save' last position reached in Google street view session.

thank you for any help,

m.

Share this post


Link to post
Share on other sites

Thank you for reply,

but i need to get URL from currently page.

In my case i force start navigation to an existing URL (google street view link)

and allow user to update page. So i can't modify html and control onclick event.

I search function similar to FF.au3 _FFCmd function:

$sURL = _FFCmd(".location.href")

that retrieve last URL from currently active tab...

I want to change my embedded IE with Firefox one, but can't find working example...

m.

Share this post


Link to post
Share on other sites

I dont understand... try to say it in italian coz I'm italian too

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Grazie per l'interessamento,

vorrei ritrovare l'URL dalla pagina di explorer che sto attualmente guardando.

Thank you for your attention,

I would get URL from IE browser currently being viewed.

m.

(non sapevo fossi italiano complimenti per i tuoi lavori !)

[i don't know you are italian good work with your scripts!)

Edited by myspacee

Share this post


Link to post
Share on other sites

see what valuater has already suggested: "_IEPropertyGet", it returns the URL of the page you are currently viewing

Share this post


Link to post
Share on other sites

ok modify script to monitor constantly my actual page:

#include <IE.au3> 

$o_IE = _IECreate("http://maps.google.it/maps/mpl?layer=c&moduleurl=http:%2F%2Fmaps.google.com%2Fmapfiles%2Fmapplets%2Fsv%2Feul%2Ftutorial_it.xml&ie=UTF8&cbll=41.902365,12.458378&panoid=j09L3Jj9iEehXuGRMBp7Ag&cbp=12,274.46,,0,5&ll=41.902277,12.45856&spn=0,359.980774&z=16")

while 1
    $Info = _IEPropertyGet($o_IE, "locationurl")

    ToolTip($Info,0,0)
    sleep(1000)
WEnd

But in my case (google street view object) doesn't works.

only chance is to sendmouse on 'link' and try to intercept link returned :D

Remember that exists a function that simulate click on a control (lnk) in a page...

m.

Share this post


Link to post
Share on other sites

I dont know, it dispalys the right URL to me...

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

si, mostra il corretto URL ma se navighi nel frame di Google street view (ti sposti con le frecce)

Autoit non è in grado di trovare il nuovo link...

Questo link aggiornato è invece restituito dalla voce 'Link' sulla destra, che ritorna sia il link del punto in cui sei, sia la sintassi html per creare un frame.

Yes, func show right URL but if you SURF inside Google street view frame (you move with arrows)

Autoit can't update new link...

This updated link is returned instead by 'Link' on the right, it return two information, link for your actual position, and HTML syntax to create a frame.

Im searching for this information:

Posted Image

this link is actual position in google street view frame i want.

m.

Edited by myspacee

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