Automate Web Browser and run the automation automatically

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
viktorrose
Posts: 1
Joined: 18 May 2013 14:45

Automate Web Browser and run the automation automatically

#1 Post by viktorrose » 18 May 2013 14:55

I need to go to one website and press a button after every 3 hours all the time.
So cud someone help me to find a way to automate my web browser and run the automation even if I am not at the computer.

I tried to write a batch file with just the URL of this button and put it on loop with timeouts of 3 hours after every execution but it did not work
I have heard that it can be done with Excel or Google chrome automation addon but the problem is that I need it to run by it self after every 3 hours.

here is the site: http://www.mumspiederdebesis.lv/latvies ... sa-plakats
And the button I want to press is the orange voting button with heart and numbers.

Endoro
Posts: 244
Joined: 27 Mar 2013 01:29
Location: Bozen

Re: Automate Web Browser and run the automation automaticall

#2 Post by Endoro » 18 May 2013 15:23

you might this modify for your requirements.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Automate Web Browser and run the automation automaticall

#3 Post by foxidrive » 18 May 2013 23:22

Look at a tool called AutoIt to click things - it is another scripting tool and should be more appropriate.

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Automate Web Browser and run the automation automaticall

#4 Post by Ed Dyreen » 19 May 2013 08:56

As Foxi says clicking is good for learning AutoIt.

Keep in mind that AutoIt supports the Document Object Model or simply DOM through <IE.au3> :)
( for fireFox <FF.au3> )

Example:

Code: Select all

#include <IE.au3> ;IE Commands

$oIE = _IEAttach( 'about:blank', 'HWND' )
If @ERROR <> 0 _
And ShellExecute( 'iexplore.exe', 'about:blank', '', '', @SW_HIDE ) _
Then WinWait( 'about:blank', '' )

$oIE = _IEAttach( 'about:blank', 'HWND' )
If @ERROR = 0 Then
; (
   _IENavigate( $oIE, 'http://some.site.com' )
   _IELoadWait( $oIE )
   $oForm  = _IEFormGetObjByName( $oIE, 'f1' )
   $oLogin = _IEFormElementGetObjByName( $oForm, 'login' )
   $oPassw = _IEFormElementGetObjByName( $oForm, 'passwd' )

   If _IEFormElementSetValue( $oLogin, 'some thing' ) _
   And _IEFormElementSetValue( $oPassw, 'else' ) _
   Then _IEFormSubmit( $oForm, 0 )
; )
EndIf
If you are interested just ask our friends at AutoIt, ;)

Post Reply