Solved

Any code to automatically close a browser window?

Posted on 2009-07-06
4
242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Make the most of your online learning experience.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

717 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