ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: IdleClose - exit certain programs after x minutes of idle time

<< < (2/5) > >>

Cpilot:
I would think you could enumerate all the open windows then flag the foreground window with GetForegroundWindow,then set all the others on a timer list to close at interval? The one with focus would be exempt from the timer.

brotherS:
The problem is, that i don't think you'd like it to close every window, possibilly it should leave some windows open.
And i still don't know how to handle a small thing that was forgotten in this post: how about when you go away, and leave the pc? When you return, it'd have closed all the programs you have. Maybe the concept should be redefined.
-jgpaiva (February 09, 2006, 07:13 AM)
--- End quote ---
:D :D

I'd prefer if it would be based on active .exe processes, since I run some apps in tray icon mode only. And it really *should* close them whether I don't use them or leave the PC for an hour. That's where the different idle time for each .exe comes into play. Remember, I do not want to close ALL running programs, just a chosen few (but without having to select them again and again each day).

I won't mind just having to edit a script by myself to add those to a list, of course you could create a GUI too if you like that :)

jgpaiva:
Ooops brotherS.. I understood you completely wrong.
That's easier to do, i think ;)
So, the idea here is to have a script that contains a list of processes to be closed, and close them if that processes' windows have not been used for a specifiably amount of time, right?

jgpaiva:
I made this small sketch of the script's core, please check if it's what you want, if it is, say something, and i'll convert this to a program ;)


--- ----> Load Process List
-> wait for each of the processes
-> for each processes, launch a timer
-> last window active set to null
GoTo Loop


loop:
if window active is last window active
  sleep 200
  GoTo Loop
if last window active's process is in the list
  activate process's timer
if window active's process is in the list,
  stop window active's process's timer
last window active set to name of window active
GoTo Loop

brotherS:
Yes, now you got what I was trying to say  :Thmbsup:

But I doubt this will work for apps like FDM (Free Download Manager, read about it on https://www.donationcoder.com/forum/index.php?topic=1801.0) since they normally just show their tray icon, so there's no window that could be checked for activity...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version