Creating a script file or the like

Gigabyte / P35-ds4
January 8, 2009 at 16:00:41
Specs: Microsoft Windows XP Professional, 2.666 GHz / 3326 MB
I was doing backups at a clients location today and I noticed one of his staff sitting at the computer repeatedly entering their own web site, immediately exiting and then entering again.
The member did this for about 1/2 an hour.
I eventually asked what she was doing and she advised that the boss gets her to do this at least once a week so that their company name and web site come up on the first page of any one doing a google search for their particular range of products.

I thought to my self,
"Surely Self, there is a way for us to automate this?"

If all that is required is a staff member logging on and off repeatedly surely a little batch or script file could do the same thing?

Anyone have any ideas ??

or am I way off the track and the staff member has it all wrong

I attempted to create something using this little scripting package CLRScp1 - Clr Script but I get a function error trying to shut the web browser

void Browse(string url)
if (!BrowseURL(url, TRUE))
if (!BrowserClose(hBrowserIE))
MessageBox("There was an error closing the browser.", "BrowserClose", MB_OK);
void main()

The bit where it attempts to close is where the error is
The idea was that it sets up the void paraameter waits 5 seconds, shuts the page down then reloads the page, you would just put 100 or so odd hits in the 'Void" - ideally I would like to not even see the the pages open, just have it run in the background.

Any and all help will be appreciated

See More: Creating a script file or the like

Report •

January 9, 2009 at 10:45:20
This batch file will start Internet Explorer and navigate to the site of your choice, wait for approximately 5 seconds, close internet explorer and then do it all over again for any number of times:

Change the website= value to the desired url.

Change waittime= value to adjust the delay before closing Internet Explorer. The default value is approx 5 seconds. You may need to adjust this depending upon the speed of the computer/internet connection.

Change the iterations= value to the number of times you want to open/close the desired web page.

=== program starts here ===
@echo off
set waittime=100000
set iterations=3
set counter=0
start "c:\program files\internet explorer\iexplore" %website%
for /L %%n in (1,1,%waittime%) do echo %%n
taskkill /im iexplore.exe /f
set /a counter=%counter%+1
if %counter%==%iterations% goto end
goto loop
=== end of program ===

Save as filename.bat, where filename is any name you wish...

Report •

January 9, 2009 at 14:23:16
Thanks very much KPTECH, you effort is very, very much appreciated. The batch file works well and does exactly what I asked, I wonder however, can the batch file be adapted so that it works equally as well in a Windows XP PRO environment but without the opening of a DOS command prompt window?
Again thank you.

Report •

January 15, 2009 at 14:04:35
Sorry for the delay in replying. Was away for a few days...

Not sure how you'd run a batch file without using a command prompt, but the next best thing would be to:

1. Create a shortcut to the batch file.

2. Right click on the shortcut's icon and select properties.

3. Select the Shortcut tab.

4. Select Minimized in the Run: field.

5. Click the OK button.

6. Edit the batch file and add a line at the very end of the file right after the :end label containing only the Exit command, like this:


This won't keep a command prompt from opening, but it will launch minimized and the "Exit" command will close the window when it's finished. That should make it less of an annoyance.

Report •

Related Solutions

January 15, 2009 at 14:10:56

My apologies. I was so involved with answering your question, that I forgot my manners.

Anyway, thank you for the kind words, you're very welcome...

Report •

Ask Question