I had a feeling you'd say thatjsmorley wrote:I think I'd be opposed to breaking the .ini file format. Key=Value must be on a single line.
It is currently April 25th, 2024, 8:47 pm
[Suggestion] GeometryMeter - For drawing simple geometry
-
- Developer
- Posts: 522
- Joined: March 2nd, 2016, 6:23 pm
Re: [Suggestion] GeometryMeter - For drawing simple geometry
-
- Developer
- Posts: 522
- Joined: March 2nd, 2016, 6:23 pm
Re: [Suggestion] GeometryMeter - For drawing simple geometry
Ok, i've got another idea...jsmorley wrote:I think I'd be opposed to breaking the .ini file format. Key=Value must be on a single line. And with it all on a single line, I don't see any real advantage to that.
What if we merge the options into pairs, something akin to how Actiontimer works?
Something like:
Code: Select all
[VectorMeter]
Meter=Vector
VectorType=Custom
Shape1=Point1|Point2|Point3|Point4
Point1=X:Xpos|Y:Ypos|Type:Type|...AdditionalOptions...
Point2=X:Xpos|Y:Ypos|Type:Type|...AdditionalOptions...
...etc...
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] GeometryMeter - For drawing simple geometry
That's promising... Very promising. I'd do the "canned" ones the same way for consistency.theAzack9 wrote:Ok, i've got another idea...
What if we merge the options into pairs, something akin to how Actiontimer works?
Something like:Code: Select all
[VectorMeter] Meter=Vector VectorType=Custom Shape1=Point1|Point2|Point3|Point4 Point1=X:Xpos|Y:Ypos|Type:Type|...AdditionalOptions... Point2=X:Xpos|Y:Ypos|Type:Type|...AdditionalOptions... ...etc...
Just have to keep in mind that not only are Key=Value on one line, but Key must be unique in the context of a single [Section].
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] GeometryMeter - For drawing simple geometry
I like that a lot actually. Aside from being somewhat consistent with ActionTimer, It has the advantage of not being "number" driven, so you don't have to do some kind of "while 'Shape' & X do" or something. The option names can be anything. Instead of Shape1 and Shape2 a user might like RedCircle= and LineThroughRedCircle= etc...
-
- Developer
- Posts: 522
- Joined: March 2nd, 2016, 6:23 pm
Re: [Suggestion] GeometryMeter - For drawing simple geometry
I understand that a key needs to be unique, that's why i'm thinking that shape is the only one that needs to be specially named(Shape1 -> ShapeN) and the points can be called whatever, since i can get the name of the points from the Shape.jsmorley wrote:That's promising... Very promising. I'd do the "canned" ones the same way for consistency.
Just have to keep in mind that not only are Key=Value on one line, but Key must be unique in the context of a single [Section].
i don't really understand what you mean with the "canned", do you mean that e.g Point1=X|Y|Type|etc, because it would be nice to be able to choose the options needed, since e,g arc has quite a few possible options...
This would also make it possible to add new options later in Rainmeter without breaking backwards compability
-
- Developer
- Posts: 522
- Joined: March 2nd, 2016, 6:23 pm
Re: [Suggestion] GeometryMeter - For drawing simple geometry
Actiontimer is kind of number driven with the ActionLists, but i was thinking the same as you i guessjsmorley wrote:I like that a lot actually. Aside from being somewhat consistent with ActionTimer, It has the advantage of not being "number" driven, so you don't have to do some kind of "while 'point' & X do" or something. The option names can be anything. Instead of Shape1 a user might like RedCircle= and LineThroughRedCircle= etc...
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] GeometryMeter - For drawing simple geometry
The number on ActionList(X) is really just to support the !CommandMeasure bang, and really isn't all that needed in this case.theAzack9 wrote:Actiontimer is kind of number driven with the ActionLists, but i was thinking the same as you i guess
Otherwise, It's sorta number driven under the covers, but not as far as option names. It just counts the "|" bar separators.
-
- Developer
- Posts: 522
- Joined: March 2nd, 2016, 6:23 pm
Re: [Suggestion] GeometryMeter - For drawing simple geometry
Not from what i understand from the source... it also uses the numbered system to find where the next shape is:jsmorley wrote:The number on ActionList(X) is really just to support the !CommandMeasure bang, and really isn't all that needed in this case.
Otherwise, It's sorta number driven under the covers, but not as far as option names. It just counts the "|" bar separators.
Code: Select all
size_t i = 1;
while (!action.empty())
{
...Code...
action = RmReadString(rm, std::wstring(L"ActionList" + std::to_wstring(++i)).c_str(), L"", FALSE);
}
-
- Developer
- Posts: 522
- Joined: March 2nd, 2016, 6:23 pm
Re: [Suggestion] GeometryMeter - For drawing simple geometry
EDIT: Ops... i replied... well...theAzack9 wrote:Not from what i understand from the source... it also uses the numbered system to find where the next shape is:Otherwise it would be quite difficult to differentiate the options...Code: Select all
size_t i = 1; std::wstring action = RmReadString(rm, L"ActionList1", L"", FALSE); while (!action.empty()) { ...Code... action = RmReadString(rm, std::wstring(L"ActionList" + std::to_wstring(++i)).c_str(), L"", FALSE); }
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: [Suggestion] GeometryMeter - For drawing simple geometry
I'm not sure, but that may be a bit of a prehensile tail. Other implementations of !CommandMeasure, specifically InputText, use a format like [!CommandMeasure MeasureName "Execute 1"] OR [!CommandMeasure MeasureName "Execute 1-3"]. ActionTimer doesn't actually support that, and so I'm not sure what value the number brings. I would think in the context of ActionTimer, that [!CommandMeasure MeasureName "Execute Bob"] or even just [!CommandMeasure MeasureName "Bob"] would work just as well.theAzack9 wrote:Not from what i understand from the source... it also uses the numbered system to find where the next shape is:Otherwise it would be quite difficult to differentiate the options...Code: Select all
size_t i = 1; while (!action.empty()) { ...Code... action = RmReadString(rm, std::wstring(L"ActionList" + std::to_wstring(++i)).c_str(), L"", FALSE); }
In any case, a minor point in the big scheme of things.