Sign in to follow this  
Followers 0
matakana

Open web page at a given time

6 posts in this topic

Hi guys

Could some please write some code so that a given web page will open at

a given time of day - say midday - and every day.

I don't have a clue where to begin, otherwise I would have a go myself.

thanks a bunch for any help!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

hmmm

something tells me that you arnt finished when you have this code on a plate for you.

So will you just come back looking for another peice of code?

The best way to start is by doing, so here is what you will need to read in the helpfile to acieve your goal (its not much)

@HOUR
ShellExecute()
While
WEnd
Sleep()

edit: you can click on them if you didnt know.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

hmmm

something tells me that you arnt finished when you have this code on a plate for you.

So will you just come back looking for another peice of code?

The best way to start is by doing, so here is what you will need to read in the helpfile to acieve your goal (its not much)

@HOUR
ShellExecute()
While
WEnd
Sleep()

edit: you can click on them if you didnt know.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Okay here is my attempt - can anyone please make it work?

thanks

#include<IE.au3>


$sUrl = "http://www.google.co.nz/"
$oIE = _IECreate($sUrl, 0, 1, 0, 1)
$sReqTime = "12:00:00" ;mid day

If and WinExists($$sUrl)
       
Then Exit ; Check if google is open
AutoItWinSetTitle($sUrl)

While 1
    If not WinExists $oIE
and $sReqTime
Then 
            $oIE = _IECreate($URL);open url
        Sleep(800)
WEnd

_IEFormSubmit($oForm)
Edited by matakana

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

One example

Global $sUrl = "http://www.google.co.nz/"
Global $oIE

While 1
    If @HOUR = 12 And @MIN = 00 Then
        _start()
    EndIf
    Sleep(1000 * 58)
WEnd

Func _start()
    $oIE = _IECreate($sUrl, 0, 1, 0, 1)
    While 1
        If WinExists("Google - Windows Internet Explorer") Then
            WinWaitActive("Google - Windows Internet Explorer") ;wait to be active
            Beep(800,200) ;do stuff
            ExitLoop
        EndIf
        Sleep(100)
    WEnd
EndFunc
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Thanks JohnOne!!! that works like a dream. :mellow:

It is slightly less scary, now I understand a few more basic things now.

Now I am onto phase 2.....

cheers matakana

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