It is currently May 26th, 2020, 9:30 am

POST request in rainmeter

General topics related to Rainmeter.
Krishneel Chand
Posts: 16
Joined: March 30th, 2018, 12:33 am

POST request in rainmeter

Post by Krishneel Chand »

Hello, I'm not sure if this is the right forum but is there a way I can get data by sending POST request?
I want to view the amount of data I have left in my cellular account so POST request with other info such as account number will be sent to get the information about the data available and the expiry date of the account.

Please help :confused:
User avatar
jsmorley
Developer
Posts: 20631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: POST request in rainmeter

Post by jsmorley »

This is not something that native Rainmeter, ala WebParser can do. I think you would have to investigate using cURL as an external process with the RunCommand plugin to have any chance of doing this.
Krishneel Chand
Posts: 16
Joined: March 30th, 2018, 12:33 am

Re: POST request in rainmeter

Post by Krishneel Chand »

Hey, thank you. So I have created a bash script with curl and have managed to get everything running. Just I wanted to know if I can automatically run this bash file at internals to get he data updated?
I have briefly went through the runcommand plugin but it seems it requires a manual left click action.
Looking for suggestions to make it fully automatic
User avatar
jsmorley
Developer
Posts: 20631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: POST request in rainmeter

Post by jsmorley »

Krishneel Chand wrote:
May 20th, 2020, 1:14 pm
Hey, thank you. So I have created a bash script with curl and have managed to get everything running. Just I wanted to know if I can automatically run this bash file at internals to get he data updated?
I have briefly went through the runcommand plugin but it seems it requires a manual left click action.
Looking for suggestions to make it fully automatic

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]

[MeasureTimer]
Measure=Loop
StartValue=1
EndValue=60
IfCondition=MeasureTimer = 1
IfTrueAction=[!CommandMeasure MeasureRun "Run"]

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Parameter=wmic cpu get name
RegExpSubstitute=1
Substitute="(?siU).*#CRLF#(.*)#CRLF#$":"\1"
OutputType=ANSI

[MeterResult]
Meter=String
MeasureName=MeasureRun
FontSize=20
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1

1.jpg


https://docs.rainmeter.net/manual/measures/loop/
https://docs.rainmeter.net/manual/measures/general-options/ifconditions/

Given an Update rate of 1000, this loop would execute every 60 seconds.
You do not have the required permissions to view the files attached to this post.