Page 1 of 1

Script for windows

Posted: Saturday 19 November 2016 11:50
by edwin1234
Hi, does someone know how to get this script to function on windows? Or is there a way to convert this script? I am a noob at scripting please help me a bit.

#!/bin/sh
SnapFile="/var/tmp/camsnapshot.jpg"

# Get snapshot via Domoticz server
wget -O $SnapFile "192.168.1.xx:8080/camsnapshot.jpg?idx=4"

# Send Telegram message with image
curl -s -X POST "https://api.telegram.org/bot1234567:AAF ... t=Doorbell is ringing!"

curl -s -X POST "https://api.telegram.org/bot1234567:AAF ... /sendPhoto" -F chat_id=-127498433 -F photo="@$SnapFile"

# Remove Image
/bin/rm $SnapFile

Thanks

Re: Script for windows

Posted: Saturday 19 November 2016 13:21
by Egregius
Install curl and wget.

Re: Script for windows

Posted: Saturday 19 November 2016 16:22
by edwin1234
thanks for your answer
i did intall both but i get "wget command not found"
what went wrong?

Re: Script for windows

Posted: Monday 21 November 2016 13:27
by stlaha2007
Both need to be in your path statement.

Move those files or add the path eg. c:\unix-ports to your path statement. Or use complete path-filename to executables.

Also change the forwardslashes to backslashed.