I've tried balala and jsmorley's codes,
had a bit of trouble making the things work, was banging my head on the wall not seeing whether Powershell was actually executing or not.
In the end I've managed to make the image download work on jsmorley base,
using the opensource software curl to download the image, rather than powershell. (https://curl.haxx.se)
I am not sure yet whether the regular refresh of the image will occur, still need to check that.
The code looks like this:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
OnRefreshAction=[!CommandMeasure MeasureGetImage "Run"]
[Variables]
InImage=https://storage.googleapis.com/trdemo/testimage.png
OutImage=#@#test.png
[MeasureGetImage]
Measure=Plugin
Plugin=RunCommand
Program=""C:\path-to\curl.exe""
Parameter="-k --output "#OutImage#" #InImage#"
State=Show
FinishAction=[!SetOption MeterImage ImageName "#OutImage#"][!UpdateMeter MeterImage]
[MeterImage]
Meter=Image
W=400
PreserveAspectRatio=1
I am not sure whether curl is indispensable and if powershell would actually work, but curl can be used in a portable form and I have spent a lot of time trying to get Powershell to work and not succeeded! It may be my company IT security settings. Curl seems to be OK with them.
presumably the Update=1000 setting would mean it would download every second? I am not seeing this for the moment, will try changing the settings to use an UpdateDivider setting to space out the downloads.
Thanks !