|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
|
Creating Sleep Timer for Applications
I know there's gotta be someway of doing this but I want to create something like a sleep timer on a clock radio but for applications such as WMP or IE. I use a streaming radio feed off the internet but when I go to sleep at night I want it to shut down IE after a certain period of time so the music doesn't play all night.
Anyone know about doing this. BTW...not sure if this is right forum or not for this..sry mods |
|
|
|
|
|
#2 |
|
Forum Administrator
Staff
Premium Member
Join Date: May 2000
Location: Joplin MO
Posts: 37,791
|
You could probably write a simple batch file or something, and put it into Scheduled Tasks.
|
|
|
|
|
|
#3 |
|
Member (7 bit)
|
That's what I was figuring would be the best way but I have no clue where to even start on that kind of thing
|
|
|
|
|
|
#4 |
|
Forum Administrator
Staff
Premium Member
Join Date: May 2000
Location: Joplin MO
Posts: 37,791
|
This may help:
http://help.lockergnome.com/lofivers...hp/t33267.html This is for a shutdown script - it will shut down your computer in an orderly fashion. |
|
|
|
|
|
#5 |
|
Professional gadfly
|
Create a new text file and name it something like "Alarm.bat"...it doesn't matter as long as it has a .bat extension. Open the file in Notepad and put this line in:
"C:\Program Files\Windows Media Player\wmplayer.exe" /prefetch:1 "http://www.npr.org/dmg/dmg.php?getProgramStream=true&NPRMediaPref=WM" Of course, use the http link for the stream you want to listen to. Save the file and exit. Go to Control Panel, then Scheduled Tasks, then Add a new task. Select the batch file you just created and set the time and frequency you want. That's it! |
|
|
|
|
|
#6 |
|
Forum Administrator
Staff
Premium Member
Join Date: May 2000
Location: Joplin MO
Posts: 37,791
|
That looks to me like it will *start* WMP, I think this person wants something to shut it OFF.
|
|
|
|
|
|
#7 |
|
Professional gadfly
|
Ah, I see, I was reading it completely backwards.
![]() Doing this in Windows is a lot harder than Linux, where you could use a cron job to grep the list of running processes and kill it from there. However, I found this utility called Task Kill that might do the trick. You can do the same thing with the batch file, and kill Windows Media Player at a specific time using the utility. |
|
|
|
|
|
#8 |
|
Member (10 bit)
Join Date: Jan 2002
Location: Oregon Coast
Posts: 768
|
Microsoft"s "Plus! Digital Media Edition" comes with a timer for WMP to shut it off and turn on. Whole package is 19.95 from Microsoft , lots of other features included too.
|
|
|
|
|
|
#9 |
|
Member (7 bit)
|
Just wanted to follow up on this. The information Doctorgonzo posted worked perfectly. I used tskill.exe and just set it up as a scheduled task. The scheduled task line read:
C:\WINDOWS\system32\tskill.exe firefox Because now the music is playing streaming through the webrowser. You can't put the .exe extension on though just the process name without the extension. Then I simply set the task up to run when the computer is idle for 100 minutes. Works like a charm. Just an FYI for anyone else wanting to do this. You can even set it up to kill Windows media player by using C:\WINDOWS\system32\tskill.exe wmplayer |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|