[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Close web browser automatically after inactivity?

Posted on 2009-07-08
8
Medium Priority
?
2,809 Views
Last Modified: 2015-01-05
On my Vista computer, i need it to close all web browser windows (IE, Firefox, Safari, Chrome) after 15 minutes of inactivity. This is because we are using a web login system which doesn't logout automatically and will remain logged in even after the computer sleeps. Maybe a script that runs before automatic sleep or hybernate. Other ideas?
0
Comment
Question by:Thomas4019
[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
8 Comments
 
LVL 6

Expert Comment

by:jwenting
ID: 24810861
Even if you were to close those windows that wouldn't log you out from the web applications.
0
 
LVL 17

Author Comment

by:Thomas4019
ID: 24810893
This is a web login application, hosted internally from my router, and it logs out after closing the window.
0
 
LVL 8

Accepted Solution

by:
Nivlesh earned 800 total points
ID: 24811491
This app might be of help.

http://www.bdvnotepad.com/sysscr_en.htm

and you could write a script (download pstools from www.sysinternals.com .. and use the following to create the script

pskill iexplore.exe
pskill firefox.exe
pskill chrome.exe


0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Author Comment

by:Thomas4019
ID: 24816004
That looks quite promising, i will try it now.

Thanks for the help.
0
 
LVL 10

Assisted Solution

by:TCB1
TCB1 earned 1200 total points
ID: 24839314
Also Autoit will do this and much more.

www.autoitscript.com
0
 
LVL 17

Author Comment

by:Thomas4019
ID: 24842034
Could you post a sample autoit script that would run an "exe" or "bat" or shortcut after a specified number of minutes of inactivity.

Now i am having problems with the screensaver way, in that certain programs seem to be preventing the screen saver from launching.
0
 
LVL 10

Assisted Solution

by:TCB1
TCB1 earned 1200 total points
ID: 24842803
Here is the script. Download autoit. You have the option to run the script as a .au3 file or you can convert it to an .exe. Change the inactivity time to your liking. I'm attaching the .au3 file. Just take off the .txt at the end.

while 1 ;run the script continuously in the background
      $startmousepos=mousegetpos() ;get the initial mouse position
      $start=TimerInit() ;Start the timer
      $end=timerdiff($start) ;Check the timer
      while $end<10000 ;Loop until timer is greater than 10 seconds (inactive threshold)
            sleep(1000) ;wait 1 second
            $endmousepos=mousegetpos() ;get the mouse position to see if changed
            if $startmousepos[0]<>$endmousepos[0] or $startmousepos[1]<>$endmousepos[1] Then
                  $startmousepos=$endmousepos ;if mouse postion changed, reset mouse position
                  $start=TimerInit() ;if mouse postion changed, reset timer
            EndIf
            $end=timerdiff($start) ;Check timer
      WEnd
      ;Do the following when the inactive threshold is met
      processclose("firefox.com") ;close firefox
      processclose("iexplorer.exe") ;close internet explorer
      processclose("chrome.exe") ;close Google Chrome
      processclose("safari.exe") ;close Safari
      ;May need to confirm the proper process name for each program you want to close.
        ;You can also close the programs via a winclose("Window Name") command. Check autoit docs   for more info.
WEnd
closewebpages.au3.txt
1
 
LVL 17

Author Closing Comment

by:Thomas4019
ID: 31628067
Thanks for your creative solutions.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

650 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