It is currently March 28th, 2024, 7:03 pm
Creating Rainmeter Notification Application
-
- Posts: 32
- Joined: March 26th, 2018, 1:09 pm
Creating Rainmeter Notification Application
Is there a way to use Rainmeter to be configured to act as a pop-up notifications viewer via Windows 10 desktop. I want the ability to view pop-up notifications via the desktop when changes are made on the server-side to push out new content.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Rainmeter Notification Application
It depends on how you want to structure this. You can have a skin on the local desktop in Rainmeter that can either read a file on a remote server via HTTP, or directly if you can use a network URI path to get to it. Then have the server process write to this file with whatever you need, certainly including a timestamp. The local Rainmeter skin would periodically read this file, parse it, and react to "new" messages based on the timestamp.
In any case, once you are able to get the local Rainmeter to detect that something "new" has happened, it's not hard to have it pop-up, slide out, sound alarms, whatever you need.
I'd need to know more about what you have in mind, a bit more "step by step"
In any case, once you are able to get the local Rainmeter to detect that something "new" has happened, it's not hard to have it pop-up, slide out, sound alarms, whatever you need.
I'd need to know more about what you have in mind, a bit more "step by step"
-
- Posts: 32
- Joined: March 26th, 2018, 1:09 pm
Re: Creating Rainmeter Notification Application
Okay Here's the setup
Application:
I have a rainmeter skin already built out to read and parse a JSON file on the server and display only the "Title" information from the JSON file as a clickable link to an article. I want the ability to have the Rainmeter application pop-up slide etc... when the JSON file is updated. The user has the ability to close the rainmeter application via a close button, but when the JSON file is updated I need the rainmeter application to pop-up again on the desktop.
My Question:
- How do I achieve the pop-up animation etc...
- How do I code to listen for changes to the JSON file (The local Rainmeter skin would periodically read this file, parse it, and react to "new" messages based on the timestamp.)
Application:
I have a rainmeter skin already built out to read and parse a JSON file on the server and display only the "Title" information from the JSON file as a clickable link to an article. I want the ability to have the Rainmeter application pop-up slide etc... when the JSON file is updated. The user has the ability to close the rainmeter application via a close button, but when the JSON file is updated I need the rainmeter application to pop-up again on the desktop.
My Question:
- How do I achieve the pop-up animation etc...
- How do I code to listen for changes to the JSON file (The local Rainmeter skin would periodically read this file, parse it, and react to "new" messages based on the timestamp.)
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Rainmeter Notification Application
Do you have complete control over the server-side of this deal? It would be easiest if the json "entry" had a timestamp of some flavor, it can be a Unix EPOC timestamp, a Windows FILETIME timestamp, or a formatted date/time like "Jan 1, 2108 08:32:00" in pretty much any format you want. It MUST reflect both the date and exact time to the second.
Then the skin would read this file with WebParser, and get the timestamp from the "latest" entry to the json file. It would then do the following:
1) Look for a [Variable], maybe called LatestTime or something, that would have a timestamp as its value, and see if the timestamp from the json is "newer" than that variable.
If it is, then
a) trigger the animation / alert stuff. We can get to that in a bit.
b) physically write the timestamp from the json to that Variable in the skin
c) refresh the skin
If it is not, then
a) do nothing
So if a "new" timestamp shows up in the json, the skin will detect that and do animation stuff, followed by physically writing the new timestamp to the variable in the file.
What this means is that you can't react to "specific" entries in the json, only the "latest".
Does this sound like what you have in mind?
Then the skin would read this file with WebParser, and get the timestamp from the "latest" entry to the json file. It would then do the following:
1) Look for a [Variable], maybe called LatestTime or something, that would have a timestamp as its value, and see if the timestamp from the json is "newer" than that variable.
If it is, then
a) trigger the animation / alert stuff. We can get to that in a bit.
b) physically write the timestamp from the json to that Variable in the skin
c) refresh the skin
If it is not, then
a) do nothing
So if a "new" timestamp shows up in the json, the skin will detect that and do animation stuff, followed by physically writing the new timestamp to the variable in the file.
What this means is that you can't react to "specific" entries in the json, only the "latest".
Does this sound like what you have in mind?
-
- Posts: 32
- Joined: March 26th, 2018, 1:09 pm
Re: Creating Rainmeter Notification Application
This is spot on. Yes I do have access to the Server-Side. As far as the scripting go where can I find info on language to do all the server checks.
Questions:
- As far as the server-side go, what do i need to control
- How to implement animation (documentation etc....)
- As far as the scripting go where can I find info on language to do all the server checks.
Questions:
- As far as the server-side go, what do i need to control
- How to implement animation (documentation etc....)
- As far as the scripting go where can I find info on language to do all the server checks.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Rainmeter Notification Application
You are not going to be able to have Rainmeter react to a change in the json file if it is not running. The sever simply CANNOT execute an application on the local PC.
-
- Posts: 32
- Joined: March 26th, 2018, 1:09 pm
Re: Creating Rainmeter Notification Application
Okay, so having a close button is pointless. Is there a way to but Rainmeter application in background , not visible to user until a update to json? So since rainmeter application still have to be active/visible how does the pop-up animation work look etc....
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Rainmeter Notification Application
Sure, but let's get to the mechanics of the skin in a bit. First, do you have an example of the json you are proposing to use? I'd like to see that so I can help with how to read it and detect if the latest entry is "new".mobileqa wrote:Okay, so having a close button is pointless. Is there a way to but Rainmeter application in background , not visible to user until a update to json? So since rainmeter application still have to be active/visible how does the pop-up animation work look etc....
-
- Posts: 32
- Joined: March 26th, 2018, 1:09 pm
Re: Creating Rainmeter Notification Application
The Skin is pretty simple. I'm just parsing the JSON to display the "Title" and referencing the URL to make the Title Clickable. I already have the RegEX working for this part.
JSON:
JSON:
Code: Select all
[{
"id": 1,
"title": "Title 1",
"description": "description one",
"url": "",
"active": true,
"created_at": "03/22/2018 22:00",
"updated_at": "03/22/2018 22:00"
},
{
"id": 2,
"title": "Title 2",
"description": "description two",
"url": "",
"active": false,
"created_at": "03/22/2018 22:00",
"updated_at": "03/22/2018 22:00"
}
]
Last edited by Brian on March 28th, 2018, 1:55 pm, edited 2 times in total.
Reason: Please use [code] tags.
Reason: Please use [code] tags.
-
- Developer
- Posts: 22628
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Creating Rainmeter Notification Application
So what you really want is to react to ANY of these entries being "new"?mobileqa wrote:The Skin is pretty simple. I'm just parsing the JSON to display the "Title" and referencing the URL to make the Title Clickable. I already have the RegEX working for this part.
JSON:Code: Select all
[{ "id": 1, "title": "Title 1", "description": "description one", "url": "", "active": true, "created_at": "03/22/2018 22:00", "updated_at": "03/22/2018 22:00" }, { "id": 2, "title": "Title 2", "description": "description two", "url": "", "active": false, "created_at": "03/22/2018 22:00", "updated_at": "03/22/2018 22:00" } ]