topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 10:58 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: WinampKiller  (Read 10873 times)

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
DONE: WinampKiller
« on: February 06, 2006, 09:55 AM »
https://www.donation...ex.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...nfo/activewinamp.htm (thanks to jgpaiva for finding this) could help you?
« Last Edit: February 18, 2006, 02:39 AM by brotherS »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: WinampKiller
« Reply #1 on: February 06, 2006, 12:02 PM »
I found these plugins:
http://www.winamp.co...etails.php?id=145717 -> a sleep timer
http://www.winamp.co...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:
#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, 12:06 PM by jgpaiva »

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: IDEA: WinampKiller
« Reply #2 on: February 06, 2006, 03: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...

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: DONE: WinampKiller
« Reply #3 on: February 18, 2006, 02:40 AM »
I'm using https://www.donation...dex.php?topic=2377.0 for this task now  :Thmbsup:

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: DONE: WinampKiller
« Reply #4 on: March 01, 2006, 06:33 PM »
 :) 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
    • View Profile
    • Donate to Member
Re: DONE: WinampKiller
« Reply #5 on: March 02, 2006, 01: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?

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: DONE: WinampKiller
« Reply #6 on: March 02, 2006, 04: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
    • View Profile
    • Donate to Member
Re: DONE: WinampKiller
« Reply #7 on: March 02, 2006, 07:48 AM »
Wow, great find!  :up:

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

bliss

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 19
  • la la la-la
    • View Profile
    • bLisTeRinG soft
    • Read more about this member.
    • Donate to Member
Re: DONE: WinampKiller
« Reply #8 on: March 10, 2006, 10:32 PM »
I had trouble shutting down (w98se) whenever the dialup or winamp were still loaded so I did this:

;;;    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?