I everyone! I was thinking of adding some online user counter and what i will need to do it (some backend database or such). Can someone give me a push on the right direction to do it? I'm not asking for code, just the tools to do it!! I love breaking my head on walls to reach my goals I have a little knowledge of js, php and mysql but nothing to deep.
Thank you so much to everyone!!
It is currently September 14th, 2024, 10:23 pm
Lua user counter question
-
- Posts: 58
- Joined: January 10th, 2015, 3:14 pm
-
- Rainmeter Sage
- Posts: 16539
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Lua user counter question
Not enough details, so please post some. For instance why have you posted this question into the Lua scripting section? Such task usually can be done with plain Rainmeter code, through WebParser measures, no need for lua, but if login is required to get the users, that's impossible for those WebParser meausres.
So what is the source of the information you'd like to collect and which those information are? Give us a few details please.
-
- Posts: 58
- Joined: January 10th, 2015, 3:14 pm
Re: Lua user counter question
Hi! I don't want to collect any information, i just want the skin to send a packet to a server where i can count the total packets (using my skin) and then add that number to that skin. Simplifing things, a user counter. If 5 people are using my skin i want to add that "5" to mi skin. I've posted on lua because i don't see how rainmeter can do that. I thought that rainmeter can ping some server and then i can read that pings on backend but it wont work because everything hitting the server will count, am i right?balala wrote: ↑November 3rd, 2020, 1:39 pm Not enough details, so please post some. For instance why have you posted this question into the Lua scripting section? Such task usually can be done with plain Rainmeter code, through WebParser measures, no need for lua, but if login is required to get the users, that's impossible for those WebParser meausres.
So what is the source of the information you'd like to collect and which those information are? Give us a few details please.
Thinking of it again while i was writing it, can i ping a certain port and just read the pings on that specific port on backend???
Thank you balala!
-
- Rainmeter Sage
- Posts: 16539
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Lua user counter question
Unfortunately I don't know. Have to think a little bit deeper onto this, but for now, I'n not sure at all.Zaragan wrote: ↑November 3rd, 2020, 1:54 pm Hi! I don't want to collect any information, i just want the skin to send a packet to a server where i can count the total packets (using my skin) and then add that number to that skin. Simplifing things, a user counter. If 5 people are using my skin i want to add that "5" to mi skin. I've posted on lua because i don't see how rainmeter can do that. I thought that rainmeter can ping some server and then i can read that pings on backend but it wont work because everything hitting the server will count, am i right?
Thinking of it again while i was writing it, can i ping a certain port and just read the pings on that specific port on backend???
Sorry...
-
- Posts: 58
- Joined: January 10th, 2015, 3:14 pm
Re: Lua user counter question
Don't worry, for now im fine knowing if this is possible or not. Thinking how to do it if it's possible will be next! Thank you anyways balala!!
-
- Rainmeter Sage
- Posts: 16539
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Lua user counter question
For nothing, I didn't help this time. Hoping someone else out there will help you soon.
-
- Developer
- Posts: 22743
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Lua user counter question
I'm not sure how I would even start with this. At the end of the day, about the only thing you can do natively with Rainmeter is read some text file. That can be an HTML / XML / JSON file you get to by serving it via HTTP or FTP, or a physical file you get to via a path to a location on a local hard drive or shared server drive. I don't think Lua adds any particular value to this, as WebParser is probably all you need to access the information. Then you parse that and return the value.
I don't see that Rainmeter is going to do anything based on "pings" to a server, unless you want to use WebParser to parse a server log somewhere.
I don't see that Rainmeter is going to do anything based on "pings" to a server, unless you want to use WebParser to parse a server log somewhere.
-
- Posts: 58
- Joined: January 10th, 2015, 3:14 pm
Re: Lua user counter question
Ok, a followup on this.
I've already done the code for a tcp socket and prepared all the "backend" of this proyect. then while i was trying to make a connection trough rainmeter lua5.1 manual, wrote the code to start the connection aaaaand BUM! First wall.
Ok i might need to declare it first... weird but ok, i dont know lua so...
NOPE!
2 freaking hours looking at the lua reference, tests codes and surfing to find that EVERYONE uses that code and it's just rainmeter that CAN'T USE REQUIRE!!!!!!
PLEASE!! Put the "Restrictions" section of the lua scripting at the top or make a link on the reference left menu.....
regexp can only "read" so until rainmeter can "talk" outside this proyect is on hold...
I've already done the code for a tcp socket and prepared all the "backend" of this proyect. then while i was trying to make a connection trough rainmeter lua5.1 manual, wrote the code to start the connection aaaaand BUM! First wall.
Code: Select all
local host, port = "127.0.0.1", 11111
local socket = require("socket")
.
.
.
.
Ok i might need to declare it first... weird but ok, i dont know lua so...
NOPE!
2 freaking hours looking at the lua reference, tests codes and surfing to find that EVERYONE uses that code and it's just rainmeter that CAN'T USE REQUIRE!!!!!!
PLEASE!! Put the "Restrictions" section of the lua scripting at the top or make a link on the reference left menu.....
regexp can only "read" so until rainmeter can "talk" outside this proyect is on hold...
-
- Rainmeter Sage
- Posts: 16539
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Lua user counter question
Well, actually Rainmeter can talk...
-
- Rainmeter Sage
- Posts: 16539
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Lua user counter question
But Dutch is also available (as well as many other languages), supposing the proper Windows language pack is installed on the computer. See this and the Name option on the above link.