It is currently April 25th, 2024, 4:44 am

ImageButton issue

Get help with creating, editing & fixing problems with skins
User avatar
ShadowDragon
Posts: 44
Joined: January 28th, 2021, 4:30 pm

Re: ImageButton issue

Post by ShadowDragon »

balala wrote: February 5th, 2021, 8:13 pm In an expression like #L1# [!Delay "150"] [!ShowGroup "L1"] first is executed #L1# (whatever is it, but it definitely should be bangs), then due to the following [!Delay "150"] bang Rainmeter waits for 150 millisecond and finally it executes the [!ShowGroup "L1"] bang. What do you mean by "the button image does not work anymore,"?

Do you mean you've added the above !Delay bang with quotes into an option (a LeftMouseDownAction option for instance)? If you did, it's wrong, don't quote the whole bang, it's not needed.

It can be simply added, but makes no sense at all. Using just a !Delay bang is useless, because this bang is used to delay the execution of bangs following the !Delay bang. If there are no bangs after !Delay, what to delay?
to make it a bit simple: OCMM = "[!Delay "150"][!RainmeterToggleMeter MS1L] ............ " < -- this works
L1G = [!Delay "150"] [!ShowMeter "MS1LA"] [!ShowMeterGroup "L1"] [!HideM........] <-- this DOES not.

even when I put the entire line in quoutes, it doesn't work either, you click it, but it doesn't open while OCMM DOES
open the side groups, the L1G, L2G etc doesn't open the 5 others in this group which can be executed the programs.

while those are all buttons, the L1G button group show the press down and open the folder/program set in here.
but L1G with delay in it, does NOT open it at all, which is kind weird why that doesn't respond while the OCMM does.

what is the differents, because OCMM has ToggleMeter and L1G does not?
OCMM also have "[!HideMeter "L1"]" as well, so it closes everything when the main button is pressed.

Delay main button works, Delay groups does not. it doesn't make sense though.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ImageButton issue

Post by balala »

ShadowDragon wrote: February 5th, 2021, 8:29 pm to make it a bit simple: OCMM = "[!Delay "150"][!RainmeterToggleMeter MS1L] ............ " < -- this works
L1G = [!Delay "150"] [!ShowMeter "MS1LA"] [!ShowMeterGroup "L1"] [!HideM........] <-- this DOES not.
A first question when I look to the above options: are there two distinct meters, one named [MS1LA] and the other [MS1L]?
There is nothing in the posted options which should prevent L1G to work, however what I see is that in your previous reply you've used a #L1# variable, not #L1G#. Are there two such distinct variables?

Note that the !Rainmeter... bang prefix has been deprecated long time ago, you shouldn't use it.
ShadowDragon wrote: February 5th, 2021, 8:29 pm even when I put the entire line in quoutes, it doesn't work either, you click it, but it doesn't open while OCMM DOES
open the side groups, the L1G, L2G etc doesn't open the 5 others in this group which can be executed the programs.
No need to quote them, because: https://forum.rainmeter.net/viewtopic.php?f=5&t=27375&p=142041&p142041#p142041
ShadowDragon wrote: February 5th, 2021, 8:29 pm Delay main button works, Delay groups does not. it doesn't make sense though.
I assure you, if used correctly, the !Delay bang does work, hiding / showing both, meters or groups.
User avatar
ShadowDragon
Posts: 44
Joined: January 28th, 2021, 4:30 pm

Re: ImageButton issue

Post by ShadowDragon »

than why does it not work when I add it?

#L1# is a example, as #L1G# is used, L1 is the ground name, for the other is L2.
I can send you the zip for the skin, in the current state (it has codes NOT YET defined).

it does work this way, but when you add in L1G = [!Delay 150] before the !showmeter and !hideMeter, it doesn't work.
you can click on it, but it doesn't open at all. when removing the !delay it works normally. so something is blocking
or reading the !Delay part.

the execution buttons are set elsewhere, but functional otherwise.

I can send you the Skin (4.4 might be required), I add Delay on L1G and none to L2G, so you can see, 1 does NOT work,
and 2 DOES work.

also the toggle, without !rainmeterToggleMeter without !Rainmeter does NOT work, so it is required to toggle.
if I can add the delay at the MS1L, than it is working for each group I made.

ALSO TO EVERYONE DOWNLOADING THE SKIN:
THE SKIN IS NOT USEABLE OR EDITABLE WITHOUT PERMISSION FROM ME!
I try to learn, so the code might be a mess, but the position is also INCORRECT at the moment because of the image
size changes a few times.

if you can help out why delay or button dont work on DELAY or at LeftMouseDownAction. it would be gratefull.
because this get a bunch of more codes to it, so if this is working, I share the end result of this menu.

the TERMS OF USE for that, will add by the time, so it's forbidden to use this skin for personal or share anywhere or
claim as your own!
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ImageButton issue

Post by balala »

ShadowDragon wrote: February 5th, 2021, 9:26 pm it does work this way, but when you add in L1G = [!Delay 150] before the !showmeter and !hideMeter, it doesn't work.
you can click on it, but it doesn't open at all. when removing the !delay it works normally. so something is blocking
or reading the !Delay part.
The issue is caused by the spaces added between the !Delay and the next !ShowMeter bangs. So, the following variable doesn't work:

Code: Select all

L1G = [!Delay "150"] [!ShowMeter "MS1LA"] [!ShowMeterGroup "L1"] [!HideMeterGroup "L2"] [!HideMeterGroup "L3"] [!HideMeterGroup "L4"] [!HideMeterGroup "R1"] [!HideMeterGroup "R2"] [!HideMeterGroup "R3"] [!HideMeterGroup "R4"]
But this one does:

Code: Select all

L1G = [!Delay "150"][!ShowMeter "MS1LA"] [!ShowMeterGroup "L1"] [!HideMeterGroup "L2"] [!HideMeterGroup "L3"] [!HideMeterGroup "L4"] [!HideMeterGroup "R1"] [!HideMeterGroup "R2"] [!HideMeterGroup "R3"] [!HideMeterGroup "R4"]
The only difference is that I removed the first space between the [!Delay "150"] and the [!ShowMeter "MS1LA"] bangs.
As a general advice, try to get rid of all those unneeded spaces into all those options. Don't add spaces around the equalities, between bangs and so on.
Yes, I admit it is extremely weird and have no explanation so far. A dev would be needed here, to say what's going on.
User avatar
ShadowDragon
Posts: 44
Joined: January 28th, 2021, 4:30 pm

Re: ImageButton issue

Post by ShadowDragon »

that's weird, spaces are there to make it cleaner and easier to copy past, now that part is fixed (I might need), I just need to
se how to fix the alpha part, while toggle works, except but switching not yet, I might need to add the Add variable apla
of EACH and update all meters groups L1 through R1, but hope to figure that part out later.

need to see whats the best way for that part, but it's weird that space dont work, and without does.
I check tomorrow or later for alpha1 and alpha2, to see if I can toggle the alpha.
because when MS1LA become inactive, it's alpha stays on 0, so I need a long line of variables 255 when exit that group.
if it's works, I'm happy, but I'm 1 step closer :)
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ImageButton issue

Post by balala »

ShadowDragon wrote: February 5th, 2021, 10:19 pm I just need to
se how to fix the alpha part,
What do you mean by "alpha part"?
ShadowDragon wrote: February 5th, 2021, 10:19 pm but it's weird that space dont work, and without does.
Maybe you should post the description into the Bugs & Feature Suggestions. Might this be a bug?
User avatar
ShadowDragon
Posts: 44
Joined: January 28th, 2021, 4:30 pm

Re: ImageButton issue

Post by ShadowDragon »

ImageAlpha, I was thinking using main, and a sub, but that doesn't work, so maybe around:
when mouse is down to close the menu or choose another submenu, around this:

LMDA = [#alpha1[alpha2[alpha3[alpha4 "255"]]]]

not sure if that wil work, while it was in a nested variable [#var1[#var2]] but not on adding values to those.
than I need to update the meter as well, but [!UpdateMeter (groupsname)] 8x or if [!Updatemeter *] or [!Updatemeter "*"]
to target all, not I dont know if that also target the full skin of the ini active, or just the group whas before it.

both 8x would work, but alpha1 255, alpha2 255 etc makes a very long list, but it works maybe after trying it out.
but if I can make it shorter, like the LMDA sample, it will make it worthwhile :).

but I also check the bugs and feature suggestion as well.
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ImageButton issue

Post by balala »

ShadowDragon wrote: February 6th, 2021, 2:37 pm than I need to update the meter as well, but [!UpdateMeter (groupsname)] 8x or if [!Updatemeter *] or [!Updatemeter "*"]
Supposing in the [!UpdateMeter (groupsname)] bang, groupsname is the name of a meter group, this definitely doesn't work. Try [!UpdateMeterGroup "groupsname"] instead. If that's not the name of a group, you have to create the group of meters (adding a Group=groupsname option to each meter you'd like to include in the group), then update all those meters with the [!UpdateMeterGroup "groupsname"] bang.
User avatar
ShadowDragon
Posts: 44
Joined: January 28th, 2021, 4:30 pm

Re: ImageButton issue

Post by ShadowDragon »

it's more the meter name of hiding active groupname instead of the full group, so the unactive button
become visible, like MS1LA, MS2LA to hide, and MS1L, MS2L etc return the value alpha value to 255 which I hide.
so I need to update each of those meter, + all alpha meters respectively. so it become 8 meter updates, and 7 meters alpha check return
to 255 (even if some has those) but the check must be there, else the button is invisible and cannot be clicked if you click on a different
button instead of the same.

the alpha is there to hide the button image, because it's semi transparant like the image that has no alpha, because this
is simply show and hide, button needs alpha or the button is still visible and looks weird, so I need to back this or nesting
alpha to 255 in 1 sweep. seperately works so far I know at reading, jst like hiding all the meters in my variables.

but most of it is working smoothly.

is there a way to close the thread as solved? or is it always open for further replies?
User avatar
balala
Rainmeter Sage
Posts: 16168
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: ImageButton issue

Post by balala »

ShadowDragon wrote: February 6th, 2021, 6:59 pm is there a way to close the thread as solved? or is it always open for further replies?
No need to close it, it remains open. but you can mark it solved, by going to the first post of the topic, click Edit post (the first button, showing a pencil) and click the green checkbox, instead of none in the Topic icon menu:
Solved.png
You do not have the required permissions to view the files attached to this post.