Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Any code to automatically close a browser window?

Posted on 2009-07-06
4
Medium Priority
?
247 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 1500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
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…

609 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