Autohotkey Script for Pause/Resume with Live Monitoring

Got a program that plays well with SABnzbd? Share it here!
Post Reply
docbrown00
Newbie
Newbie
Posts: 5
Joined: September 16th, 2010, 12:51 pm

Autohotkey Script for Pause/Resume with Live Monitoring

Post by docbrown00 »

Hello,

I thought I'd share a little script I wrote for Autohotkey (as sabnzbd doesn't seem to support hotkeys yet!)

What the script does:
  • Assigns Scroll Lock as the hotkey to Pause and Resume Sabnzbd silently. No Browser popup.
  • Monitors the status of Sabnzbd. When downloads are resumed, the Scroll Lock LED will turn on.
I've found this useful in checking if my downloads are running (which is often the case when my gaming goes late into the night and overlaps my Sabnzbd scheduling) and pausing them without using alt+tab.
docbrown00 wrote: I have updated this with a few more lines.

It functions as before but i have also added "Shift+Scroll Lock" Hotkey which will toggle the download speed limit according to the values you set.Enter your HOST:PORT, APIKEY and replace YOURLOWSPEEDLIMIT and YOURHIGHSPEEDLIMIT with your choices (e.g. replacing "YOURHIGHSPEEDLIMIT" with "4096" will limit the rate to 4MB/s).
The Num Lock LED will blink if you are in Lowspeed mode and Num Lock and Scroll Lock LEDs will blink if in Highspeed mode.

I find this useful if I decided to watch a video on youtube and require a little more bandwidth for ease of use.

I am looking into how to allow for multiple toggle states so I could have lowspeed, mediumspeed and uncapped.
UPDATE:

I have changed the name of this little script and compiled and executable version for those who don't have Autohotkey.

If you cannot get the keyboard LEDs to light up for you but the scroll lock and SHIFT+scroll lock shortcuts still work for you, please post in this thread and I'll add a little more code so you can change keyboard assignment.

I suggest placing the .exe in a folder of its own (in "/Program Files/" sounds ideal  ;D) as it will generate some files. It is possible to decompile the script using Exe2Ahk though it will appear without comments.

NEW executable.
Autosabkey.exe

OLD Autohotkey script.
Autosabkey.ahk
Last edited by docbrown00 on October 7th, 2010, 1:45 am, edited 1 time in total.
fr0st
Newbie
Newbie
Posts: 11
Joined: March 15th, 2010, 12:21 am

Re: Autohotkey Script for Pause/Resume with Live Monitoring

Post by fr0st »

thanks, I can see this being used daily.
docbrown00
Newbie
Newbie
Posts: 5
Joined: September 16th, 2010, 12:51 pm

Re: Autohotkey Script for Pause/Resume with Live Monitoring

Post by docbrown00 »

I have updated this with a few more lines.

It functions as before but i have also added "Shift+Scroll Lock" Hotkey which will toggle the download speed limit according to the values you set. Enter your HOST:PORT, APIKEY and replace YOURLOWSPEEDLIMIT and YOURHIGHSPEEDLIMIT with your choices (e.g. replacing "YOURHIGHSPEEDLIMIT" with "4096" will limit the rate to 4MB/s).

The Num Lock LED will blink if you are in Lowspeed mode and Num Lock and Scroll Lock LEDs will blink if in Highspeed mode.

I find this useful if I decided to watch a video on youtube and require a little more bandwidth for ease of use.

I am looking into how to allow for multiple toggle states so I could have lowspeed, mediumspeed and uncapped.
fr0st
Newbie
Newbie
Posts: 11
Joined: March 15th, 2010, 12:21 am

Re: Autohotkey Script for Pause/Resume with Live Monitoring

Post by fr0st »

having trouble getting this to work, But It may just be a RTFM moment. Is there anything special we need to do to get this to work? I changed all the settings in the file to match my server setup. Kinda lost now.
docbrown00
Newbie
Newbie
Posts: 5
Joined: September 16th, 2010, 12:51 pm

Re: Autohotkey Script for Pause/Resume with Live Monitoring

Post by docbrown00 »

fr0st wrote: having trouble getting this to work, But It may just be a RTFM moment. Is there anything special we need to do to get this to work? I changed all the settings in the file to match my server setup. Kinda lost now.
Did you change the digit on the end of "KeyboardClass" in the script? A few lines below "; Keyboard LED Code" there is " device =\Device\KeyBoardClass0" .  you have to change the "0" at the end of "KeyBoardClass" to a number that specifies your particular keyboard hardware. This is usually a number from 0-9. If you don't know which number represents your keyboard you can use trial and error.

KeyBoardClass0, KeyBoardClass1, etc.

You can go through 0-9 and see if that fixes it.
docbrown00
Newbie
Newbie
Posts: 5
Joined: September 16th, 2010, 12:51 pm

Re: Autohotkey Script for Pause/Resume with Live Monitoring

Post by docbrown00 »

Did a little rewrite fixing some syntax and making it more portable. Perhaps the newest version will fix your problems.
docbrown00
Newbie
Newbie
Posts: 5
Joined: September 16th, 2010, 12:51 pm

Re: Autohotkey Script for Pause/Resume with Live Monitoring

Post by docbrown00 »

Hope someone else can make use of this.

My next idea is to integrate a "burstmode" script I have that detects if the user is idle for an arbitrary time and resumes downloads, pausing when they return.

Any interest?
Post Reply