Solved

Any code to automatically close a browser window?

Posted on 2009-07-06
4
234 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

762 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

22 Experts available now in Live!

Get 1:1 Help Now