iPhone notification via Prowl [Windows script]
Posted: July 25th, 2009, 6:26 pm
Hi Everyone,
Firstly thanks to the poster for the iPhone notification via Prowl post. When I saw this I did some google searches and found out what a great idea this was. So as I run SABnzbd on a Win32 box and really have no idea about python I decided to write a CMD and VBS file to do the job, so far all works great and now all my download notifications are getting pushed to my phone.
Before you install the script make sure you get the Prowl app for the iphone. £1.79 in the UK
There are 2 parts. firstly the CMD (batch file) which is used by windows sabnzbd this basically takes the info from sabnzbd and makes the vbscript file run. The second part is the vbscript.
Part 1.
Below is the CMD file, copy the file and paste into notepad and save as prowl.cmd . Make sure you change to your prowl API key. and make sure the location set for the prowl.vbs file is correct.
Part 2.
Below is the VBScript. Copy and paste this into notepad and save as prowl.vbs and place in script folder with above CMD file.
Now just set prowl.cmd as your default script. Everytime something downloads you will get a push message on your iphone.
To Recap
1. Create a Prowl account
2. Paste the Key into the cmd file
3. Change the path to the VBS file in the cmd file
4. Buy and install the iPhone app
5. Log in to my Prowl account through the iPhone app
6. Add the cmd file as the default script.
When editing the CMD file to add the location of the Prowl.Vbs file you will need to be careful if using a location with spaces. i.e. c:\documents and settings\.
Either enter old dos format e.g. C:\Docume~1\ or make sure the command is within speech marks. Below are some examples using my documents as the folder with the scripts. (C:\documents and settings\Admin\My Documents\)
cscript C:\docume~1\Admin\Mydocu~1\prowl.vbs %API% %priority% %desc%
or
cscript "C:\documents and settings\Admin\My Documents\prowl.vbs" %API% %priority% %desc%
thanks bas & vdown for feedback.
Firstly thanks to the poster for the iPhone notification via Prowl post. When I saw this I did some google searches and found out what a great idea this was. So as I run SABnzbd on a Win32 box and really have no idea about python I decided to write a CMD and VBS file to do the job, so far all works great and now all my download notifications are getting pushed to my phone.
Before you install the script make sure you get the Prowl app for the iphone. £1.79 in the UK
There are 2 parts. firstly the CMD (batch file) which is used by windows sabnzbd this basically takes the info from sabnzbd and makes the vbscript file run. The second part is the vbscript.
Part 1.
Below is the CMD file, copy the file and paste into notepad and save as prowl.cmd . Make sure you change to your prowl API key. and make sure the location set for the prowl.vbs file is correct.
Code: Select all
set API="<Put API Key here>"
Set Item=%3
setlocal enableextensions
set var_=%Item%
set var_=%var_:=†%
set var_=%var_:Ž=„%
set var_=%var_:™=”%
set var_=%var_:"=%
set var_=%var_:!=%
set var_=%var_:_= %
set var_=%var_:;= %
set var_=%var_::= %
set var_=%var_:'= %
set var_=%var_:,= %
endlocal & set ItemConvert=%var_%
Set ItemConvert= "%ItemConvert%"
set priority=2
set desc=%ItemConvert%
cscript C:\downloads\temp\scripts\prowl.vbs %API% %priority% %desc%
Below is the VBScript. Copy and paste this into notepad and save as prowl.vbs and place in script folder with above CMD file.
Code: Select all
API = WScript.Arguments.Item(0)
priority = WScript.Arguments.Item(1)
desc = WScript.Arguments.Item(2)
set oHTTP = CreateObject("Microsoft.XMLHTTP")
oHTTP.open "Get", "https://prowl.weks.net/publicapi/add?" & "apikey=" & API & "&priority=" & priority & "&application=SABnzbd&event=" & Date() & " " & Time() & "&description=" & desc ,false
oHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
oHTTP.send
HTTPPost = oHTTP.responseText
To Recap
1. Create a Prowl account
2. Paste the Key into the cmd file
3. Change the path to the VBS file in the cmd file
4. Buy and install the iPhone app
5. Log in to my Prowl account through the iPhone app
6. Add the cmd file as the default script.
When editing the CMD file to add the location of the Prowl.Vbs file you will need to be careful if using a location with spaces. i.e. c:\documents and settings\.
Either enter old dos format e.g. C:\Docume~1\ or make sure the command is within speech marks. Below are some examples using my documents as the folder with the scripts. (C:\documents and settings\Admin\My Documents\)
cscript C:\docume~1\Admin\Mydocu~1\prowl.vbs %API% %priority% %desc%
or
cscript "C:\documents and settings\Admin\My Documents\prowl.vbs" %API% %priority% %desc%
thanks bas & vdown for feedback.