DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: DONE: WinampKiller  (Read 13,616 times)

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
DONE: WinampKiller
« on: February 06, 2006, 03:55 PM »
http://www.donationcoder.com/forum/index.php?topic=1580.40

I wonder what would be the best way to implement "after 30 minutes of IdleMuting, kill winamp.exe" - any ideas?
If skrommel prefers not to add that to IdleMute, maybe make a new tiny tool for this?

What I want is basically this: if I happen to fall asleep while Winamp is still running (so, like IdleMute, this should only work in a specified time-frame), I want it to be automatically killed/closed after x minutes. I like that skrommel's IdleMute only mutes the PC and doesn't immediately close Winamp, so if I'm at the phone I could just push my mouse to unmute the PC again.

Maybe WinampKiller could use a different approach than IdleMute though, feel free to suggest/code anything :)

And maybe http://www.myplugins.info/activewinamp.htm (thanks to jgpaiva for finding this) could help you?
Thank you.
« Last Edit: February 18, 2006, 08:39 AM by brotherS »

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: IDEA: WinampKiller
« Reply #1 on: February 06, 2006, 06:02 PM »
I found these plugins:
http://www.winamp.com/plugins/details.php?id=145717 -> a sleep timer
http://www.winamp.com/plugins/details.php?id=64006  -> offtopic, but seems to be a very nice plugin, features alarm, snooze, etc.

The plugin i mentioned above, does not check for idle, it only can be set to turn of winamp at a given time.
Though, it wouldn't be hard to do such ahk script, not associating it with Idle Mute ( because i don't want to alter the code since it's not mine), you could have something like this:
Code
#persistent
#SingleInstance,Force
;winamp shutdown
SetTimer, Sleeper, 10000
return

Sleeper:
If A_TimeIdlePhysical < 1800000 ;number of miliseconds to wait before closing winamp - this command ignores artificial keypresses, and makes the script only work in windows xp or 2k
  return
Process, Exist, Winamp.exe ; change here, if you use another player
if ErrorLevel != 0 
  Process, Close, Winamp.exe ; change here if you use another player
ExitApp ;terminates the app, since winamp isn't running anymore.
return

This program is a very fast and ugly solution, it doesn't close winamp, terminates it. Which means that if you wanted to have the last playlist the next time you open winamp, it might not be the best solution, as winamp won't save anything since it was last opened.
As i have posted before, i can't do any ini files (yet) because, i have not learned how to do them. I will in a few days. In the meantime, I commented the important parts if you'd like other settings
« Last Edit: February 06, 2006, 06:06 PM by jgpaiva »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
Re: IDEA: WinampKiller
« Reply #2 on: February 06, 2006, 09:55 PM »
Thanks for the initial work! I don't mind if the script just kills Winamp, but I need to make it work only from STARTTIME to ENDTIME. Guess I'll have to check IdleMute's code...
Thank you.

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
Re: DONE: WinampKiller
« Reply #3 on: February 18, 2006, 08:40 AM »
Thank you.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
Re: DONE: WinampKiller
« Reply #4 on: March 02, 2006, 12:33 AM »
:) Check the latest version of IdleMute at www.donationcoder.com/Software/Skrommel. It sports a second timer that kicks in after x minutes of inactivity after the initial ilde mute.

Skrommel

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
Re: DONE: WinampKiller
« Reply #5 on: March 02, 2006, 07:25 AM »
:) Check the latest version of IdleMute at www.donationcoder.com/Software/Skrommel. It sports a second timer that kicks in after x minutes of inactivity after the initial ilde mute.
Great idea!  :Thmbsup:

Now all I need is a command/exe to close Winamp in a clean way - any idea?
Thank you.

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: DONE: WinampKiller
« Reply #6 on: March 02, 2006, 10:55 AM »
Now all I need is a command/exe to close Winamp in a clean way - any idea?
I've read about this app in the forums of winamp. It's quite useful, and i think it could be the solution for your problem.
(It alows you to control winamp from the command line, and it includes the QUIT command ;))

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
Re: DONE: WinampKiller
« Reply #7 on: March 02, 2006, 01:48 PM »
Wow, great find!  :up:

I added its path plus /QUIT to IdleMute and it's working perfectly!
Thank you.

bliss

  • la la la-la
  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 19
Re: DONE: WinampKiller
« Reply #8 on: March 11, 2006, 04:32 AM »
I had trouble shutting down (w98se) whenever the dialup or winamp were still loaded so I did this:

Code
;;;    Shutdown Button v0.2 for Win98se bLisTeRinG 2006

opt = %1%
IfEqual,opt,?
  {
  Goto Help
  }
  Else
  {
  StringLen, pot, opt
  IfEqual,pot,0
    {
    opt = 9
    }
  }

WinampX:
DetectHiddenWindows, On
DetectHiddenText, On
WinKill, ahk_class Winamp v1.x

Dialup:
WinClose, Connect to
;Process, Close, RNAAPP.EXE

Cleanup:
FileRemoveDir, C:\Temp, 1
FileCreateDir, C:\Temp
FileRemoveDir, %A_WinDir%\Temp, 1
FileCreateDir, %A_WinDir%\Temp
FileDelete, %A_WinDir%\Recent\*.*
Shutdown, %opt%

Exit:
ExitApp

Help:
MsgBox, Syntax: Shutter.exe ?`n`n? is one of the following:`n`n0 Logoff`n1 Shutdown`n2 Reboot`n4 Force`n8 PwrOff`n9 Shut+PwrOff -default`n? This Help
Exit
Am we there yet?

Original address: https://www.donationcoder.com/forum/index.php?topic=2342.0