Solved

Any code to automatically close a browser window?

Posted on 2009-07-06
4
235 Views
Last Modified: 2013-11-10
Hi,

I have to run a web based script at regular intervals in order to performs some MySql Functions.

The function itself is currently opening a browser window, although I really dont have anything I need to view on those pages, and when the function is done its leaving a browser window open.  

It runs several times a day and find myself needing to log in and close the browser windows so they don't accumulate and hog up too much memory.  Is there any command I can issue that will close these windows, or some script I can write that will do this?
0
Comment
Question by:cmistre
  • 3
4 Comments
 

Author Comment

by:cmistre
ID: 24783420
I forgot to clarify, the point I was making by saying I dont need to see anything on the pages was that, if there was a way to "hit" the page without using a browser would be another way to accomplish the automated updates and bypass the browser window problem.
0
 
LVL 10

Accepted Solution

by:
TCB1 earned 500 total points
ID: 24787292
Autoit could do this easy. There is a function called winclose().

Just write a script that closes the window before your web script runs.

winclose("Window Name Here")

www.autoitscript.com

Autoit only works on windows however.
0
 

Author Comment

by:cmistre
ID: 24788955
I took a look at that and dont really understand how I would use this?  

The process is kickstarted by the successful update of a file which is already occurring automatically.  When the file is updated, it can launch any program at all so I had set up an exe file that did nothing more than C:/directory/to/IE/IE.exe "http://mysites/updatepage.cfm"  This page is the beginning of a cycle of deletes and imports based on comparing an old MySQL table to the new updated one.  

Maybe there is a more efficient way to call on this page so I dont have to close a window?   If it can close a browser window, by looking at the website, I dont have any clue how to use it to do so.  Have you used it before to where you can help me figure out where to install it and how to call the function in the very last page at the end of the entire process?
0
 

Author Closing Comment

by:cmistre
ID: 31600059
Thanks for the tip.  I was able to use this program to work it out for now, although I'd like to get something that isn't exclusive to windows at some point.  Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now