I've been trying to make a simple resizeable Clock and I think I managed to make it work using the mouse plugin altho maybe a bit clunky still, but it works..kinda
In practice it works, but it is throwing a ton of errors with weird characters when its doing the resizing..
Sometime, if I have the ini file open, it''ll even write the KeyVariables inside its own ini file instead of the Variables.inc. It'll have the whole formula instead of the result and all kind of messed up characters in it..
I feel I did something terribly wrong, but looking at the code I can't find anything. nothing obvious to a newbie like me at least..
[SettingsCheck] and [Settings] are related to a general settings window I'm using, but it really shouldn't affect the rest of the code either way.. (I could always include it if needed)
If anyone has the chance to take a look and maybe point me my mistake(s), that'll be greatly appreciated.
in the meantime a quick preview of some of what I have for the rest of skin so far, to make me feel better.
It is currently May 11th, 2024, 12:27 pm
Error log - Resizable clock
-
- Posts: 55
- Joined: November 3rd, 2023, 7:22 pm
Error log - Resizable clock
You do not have the required permissions to view the files attached to this post.
Last edited by Nookz on November 23rd, 2023, 4:25 am, edited 3 times in total.
-
- Rainmeter Sage
- Posts: 5408
- Joined: April 12th, 2012, 9:40 pm
- Location: Cedar Point, Ohio, USA
Re: Error log - Resizable clock
I am not seeing those errors in the log, but you have a "typo" in the 'Format=' line of the [Time] measure section in the 'ClockMini.ini'...
Format=%#24#H%M should be Format=%#24#:%M
After creating a @Variables.inc file with the required skin variables, the resizing seems to be working close to the way you intended when middle-click the skin. Resized
You may want to make sure you encode all of your skins as UTF-16 LE Bom so any Unicode characters are correctly displayed.
Format=%#24#H%M should be Format=%#24#:%M
After creating a @Variables.inc file with the required skin variables, the resizing seems to be working close to the way you intended when middle-click the skin. Resized
You may want to make sure you encode all of your skins as UTF-16 LE Bom so any Unicode characters are correctly displayed.
You do not have the required permissions to view the files attached to this post.
:: My DA Gallery :: Rainmeter DA Gallery :: Rainmeter Workshops :: Rainmeter Documentation :: BBCode Guide ::
-
- Posts: 55
- Joined: November 3rd, 2023, 7:22 pm
Re: Error log - Resizable clock
Ah good catch. I was using H instead of : at first, but switched it and forgot to modify the Mini version.
But I think I didn't explain my issue clearly enough.
The skin has two 'mode'. a compact one and a normal one. ClockMini is the compact one and is not meant to be resized.
The regular version of the clock skin is suppose to be resizeable on its own. If you right click the clock, a icon should appear at the bottom right and you can click&drag that to resize the skin. That is what is throwing the errors.
The middle click opens up a 'setting window' that is actually a seperate skin I use for all the other gadget skins as well.
And double left click should switch between Normal and Compact mode.
Edit:
I realize that It might be hard to figure out with a lot of those pieces missing so I updated the first post .rmskin to include everything that should be necessary to run the skin with everything that is included in its code. Please let me know if that's not the case.
Altho now the file is much larger since it include the settings skin and also my color selector skin..
I also don't think it has to do with special characters as I'm not using them. The ones that appears in the log are nowhere in the code. it's like it read the path the Variables.inc file wrong when I'm resizing 'too fast'.
But I think I didn't explain my issue clearly enough.
The skin has two 'mode'. a compact one and a normal one. ClockMini is the compact one and is not meant to be resized.
The regular version of the clock skin is suppose to be resizeable on its own. If you right click the clock, a icon should appear at the bottom right and you can click&drag that to resize the skin. That is what is throwing the errors.
The middle click opens up a 'setting window' that is actually a seperate skin I use for all the other gadget skins as well.
And double left click should switch between Normal and Compact mode.
Edit:
I realize that It might be hard to figure out with a lot of those pieces missing so I updated the first post .rmskin to include everything that should be necessary to run the skin with everything that is included in its code. Please let me know if that's not the case.
Altho now the file is much larger since it include the settings skin and also my color selector skin..
I also don't think it has to do with special characters as I'm not using them. The ones that appears in the log are nowhere in the code. it's like it read the path the Variables.inc file wrong when I'm resizing 'too fast'.
-
- Rainmeter Sage
- Posts: 7214
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Error log - Resizable clock
I don't believe it's hard to figure it out. The errors you get due to the bangs in LeftMouseDragAction from [ResizeMouse] in Clock.ini are mostly because:Nookz wrote: ↑November 23rd, 2023, 3:50 am Edit:
I realize that It might be hard to figure out with a lot of those pieces missing so I updated the first post .rmskin to include everything that should be necessary to run the skin with everything that is included in its code. Please let me know if that's not the case.
Altho now the file is much larger since it include the settings skin and also my color selector skin..
I also don't think it has to do with special characters as I'm not using them. The ones that appears in the log are nowhere in the code. it's like it read the path the Variables.inc file wrong when I'm resizing 'too fast'.
1) the $MouseX$ and similar are valid only in the context of a mouse action like click, scroll and in this case probably drag, so I would first set some variables to those $MouseX$ and such values once, then use them going forward in that bang chain (i.e. without referencing $MouseX$ and related again, on that line, somewhat similar to how $InputText$ works in an InputText measure), however, see below...
2) to use the NEW (as in not OLD) value of a just changed variable in the SAME chain of bangs where the said change happens, you MUST use the nested syntax for variables:
https://docs.rainmeter.net/manual/variables/nesting-variables/
In other words, it should be like:
Code: Select all
[!SetVariable MouseX $MouseX$][!SetVariable ClockWidth ([#MouseX]+...)][!SetVariable SomeOtherValue ([#ClockWidth]+...)]...
-
- Posts: 55
- Joined: November 3rd, 2023, 7:22 pm
Re: Error log - Resizable clock
Yin coming in with the easy solution, again. That absolutely fixed it.
Big thks!!
Just one additional question. I've been using the plugin mostly for bars before this 'resizing' test and never had to do that 'workaround', or at least I don't think I ever noticed it throwing those kind of errors in any of the other instances I've used the $MouseX$/$MouseY$. Do you suggest I go back and change all those to this format, just to make sure it's error free? Or it is something special with the resizing that might be causing it? (Like maybe the fact that when the dragging happens, the mouse is mostly outside of the skin maybe?)
Big thks!!
Just one additional question. I've been using the plugin mostly for bars before this 'resizing' test and never had to do that 'workaround', or at least I don't think I ever noticed it throwing those kind of errors in any of the other instances I've used the $MouseX$/$MouseY$. Do you suggest I go back and change all those to this format, just to make sure it's error free? Or it is something special with the resizing that might be causing it? (Like maybe the fact that when the dragging happens, the mouse is mostly outside of the skin maybe?)
-
- Rainmeter Sage
- Posts: 7214
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Error log - Resizable clock
No problem, glad to help in fixing the issue. Providing solutions is easy, though not always easy solutions, if you know what I mean...Nookz wrote: ↑November 23rd, 2023, 5:08 pm Yin coming in with the easy solution, again. That absolutely fixed it.
Big thks!!
Just one additional question. I've been using the plugin mostly for bars before this 'resizing' test and never had to do that 'workaround', or at least I don't think I ever noticed it throwing those kind of errors in any of the other instances I've used the $MouseX$/$MouseY$. Do you suggest I go back and change all those to this format, just to make sure it's error free? Or it is something special with the resizing that might be causing it? (Like maybe the fact that when the dragging happens, the mouse is mostly outside of the skin maybe?)
I see no reason in rewrite stuff that supposedly already works IF it's not throwing errors in the first place. To be clear, 1) was more like I would approach things given the length of that bang chain and possibly not the cause for the errors, while 2) was mandatory anyway given that you were using those changed variable values in the same option / line. I did not test the code to see which one of these two suggestions was the actual culprit, and although normally your suspicion regarding the mouse being outside of the skin is mostly logical, I don't think it was the cause for the errors, otherwise similar skins like the one you already saw here would have thrown errors too - even after doing 1) and 2), by the way, if the mouse location was indeed at fault. Maybe you noticed that I followed the same 1) and 2) guidelines there as well.
-
- Posts: 55
- Joined: November 3rd, 2023, 7:22 pm
Re: Error log - Resizable clock
well, that was really useful information either way. I actually ended up having similar issues with others things that same day and you solution/explanations really saved me. So thks again!