It is currently April 18th, 2024, 7:01 am

What's the difference?

Get help with creating, editing & fixing problems with skins
OrionsHope
Posts: 53
Joined: August 27th, 2021, 8:14 am

What's the difference?

Post by OrionsHope »

A.

Code: Select all

[RightCenter]
Meter=BUTTON
X=395
Y=155
ButtonImage=12.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonRightCenterOver][!RainmeterHideMeter NameButtonRightCenter]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonRightCenterOver][!RainmeterShowMeter NameButtonRightCenter]
ButtonCommand=!Execute ["E:\Users\David\AppData\Local\Programs\GIMP 2\bin\gimp-2.10.exe"]

B.

Code: Select all

[ButtonLeft1]
Meter=BUTTON
X=115
Y=40
ButtonImage=4.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonLeft1Over] [!HideMeter NameButtonLeft1]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonLeft1Over][!ShowMeter NameButtonLeft1]
ButtonCommand=!Execute ["E:\Program Files\LibreOffice\program\soffice.exe"]

This isn't a trick question, it's really kinda bizarre, actually. These are two different buttons on the same skin. Code A, when executed, does exactly what it's supposed to and leaves the passive name showing, even upon refreshing the skin. Code B, on the other hand, does what it's supposed to except upon refreshing the skin, and then the name disappears until the next time it is moused over, whereupon the passive name re-appears and it goes back to working properly and stays there until the next refresh. For the life of me, I can't tell them apart. Worse, If I copy and paste A over B, then B starts to behave like A, which is what I want. What am I not seeing? Is there another part of the meter that's being called in one and not the other? If so, how do I tell them apart?
Last edited by balala on September 14th, 2021, 1:52 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting code snippets. It's the </> button.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2602
Joined: March 23rd, 2015, 5:26 pm

Re: What's the difference?

Post by SilverAzide »

Ack! How about get rid of all the million year old obsolete commands, like !Execute, !Rainmeter..., etc. Aside from that, there's a space in the case B MouseOverAction code, after the first bang. Maybe it's that? :confused:
Gadgets Wiki GitHub More Gadgets...
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: What's the difference?

Post by CodeCode »

SilverAzide wrote: September 14th, 2021, 12:56 am Ack! How about get rid of all the million year old obsolete commands, like !Execute, !Rainmeter..., etc. Aside from that, there's a space in the case B MouseOverAction code, after the first bang. Maybe it's that? :confused:

Code: Select all

A.
[RightCenter]
Meter=BUTTON
X=395
Y=155
ButtonImage=12.png
MouseOverAction=[!ShowMeter NameButtonRightCenterOver][!HideMeter NameButtonRightCenter][!Update]
MouseLeaveAction=[!HideMeter NameButtonRightCenterOver][!ShowMeter NameButtonRightCenter][!Update]
ButtonCommand=["E:\Users\David\AppData\Local\Programs\GIMP 2\bin\gimp-2.10.exe"]


B.
[ButtonLeft1]
Meter=BUTTON
X=115
Y=40
ButtonImage=4.png
MouseOverAction=[!ShowMeter NameButtonLeft1Over][!HideMeter NameButtonLeft1][!Update]
MouseLeaveAction=[!HideMeter NameButtonLeft1Over][!ShowMeter NameButtonLeft1][!Update]
ButtonCommand=["E:\Program Files\LibreOffice\program\soffice.exe"]
Maybe this helps - I cut out unneeded depreciated bangs, and added the [!Update].
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: What's the difference?

Post by Active Colors »

Not sure, but, the space?
ED771525-7E15-4292-80E9-727F0439F688.jpeg
You do not have the required permissions to view the files attached to this post.
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: What's the difference?

Post by CodeCode »

Active Colors wrote: September 14th, 2021, 6:59 am Not sure, but, the space?

ED771525-7E15-4292-80E9-727F0439F688.jpeg
The code I posted, does not have the space.

Anyway, I am not positive, but the space might actually interrupt bang logic, as I 'might' have had to debug the same thing for me in the not so distant past.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: What's the difference?

Post by sl23 »

Active Colors wrote: September 14th, 2021, 6:59 am Not sure, but, the space?

ED771525-7E15-4292-80E9-727F0439F688.jpeg
Spaces between commands makes no difference, least not in any of my skins. I use that to be able to read the code a little better. :D
- MuLab -
User avatar
Active Colors
Moderator
Posts: 1251
Joined: February 16th, 2012, 3:32 am
Location: Berlin, Germany

Re: What's the difference?

Post by Active Colors »

sl23 wrote: September 14th, 2021, 9:42 am Spaces between commands makes no difference, least not in any of my skins. I use that to be able to read the code a little better. :D
Of course practically there are personal preferences regarding comfortable coding or readable formatting, but is just technically better to stick to the normal, recommended, and standardized way of writing a Rainmeter code. Rainmeter will try to ignore irrelevant characters or spaces between the bangs, but no one can ever guarantee that the diferent ways will work 100% of the times. There was recently a similar issue with the space https://forum.rainmeter.net/viewtopic.php?f=14&t=36882. I suggested checking that just to be sure and eliminate anything like that before going too deep into the woods like requesting to send the whole skin and analyzing it.
User avatar
sl23
Posts: 1140
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: What's the difference?

Post by sl23 »

Ok I'll keep that in mind :D
- MuLab -
User avatar
balala
Rainmeter Sage
Posts: 16143
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: What's the difference?

Post by balala »

OrionsHope wrote: September 13th, 2021, 11:59 pm This isn't a trick question, it's really kinda bizarre, actually. These are two different buttons on the same skin. Code A, when executed, does exactly what it's supposed to and leaves the passive name showing, even upon refreshing the skin. Code B, on the other hand, does what it's supposed to except upon refreshing the skin, and then the name disappears until the next time it is moused over, whereupon the passive name re-appears and it goes back to working properly and stays there until the next refresh. For the life of me, I can't tell them apart. Worse, If I copy and paste A over B, then B starts to behave like A, which is what I want. What am I not seeing? Is there another part of the meter that's being called in one and not the other? If so, how do I tell them apart?
Best would be to post the whole code, not just these two meters, otherwise it is extremely hard to tell something meaningful.
Beside this, note a few things:
  • SilverAzide wrote: September 14th, 2021, 12:56 am How about get rid of all the million year old obsolete commands, like !Execute, !Rainmeter..., etc.
    This makes no difference. Doesn't mater if those deprecated bangs / prefixes are used or not, Rainmeter will deal. It's recommended not to use them, this is another story, but if used, they create no problems.
  • SilverAzide wrote: September 14th, 2021, 12:56 am Aside from that, there's a space in the case B MouseOverAction code, after the first bang.
    Active Colors wrote: September 14th, 2021, 11:00 am There was recently a similar issue with the space https://forum.rainmeter.net/viewtopic.php?f=14&t=36882.
    This doesn't create problems either. The only bang which had such problems was !Delay, but it has been fixed, I think. However using no such useless characters (like spaces at the beginning of lines) is an extremely good idea, makes the code easier to be read, but if used, they cause no trouble at all.
So, my only idea is that I'd like to see the whole code of the incriminated skin.
OrionsHope
Posts: 53
Joined: August 27th, 2021, 8:14 am

Re: What's the difference?

Post by OrionsHope »

Interesting... Actually, I didn't write the code and I did suspect it wasn't needed but it seemed to be working so I left it. So just the !Hide, !Show, etc. is needed or is there a better a better way yet? I'm betting some of this is in the docs so I'll post again if I need further clarification.

Code: Select all

[Rainmeter]
Author=Uruloki Burning
Update=1000

[Metadata]
Name=Mass Effect 2 Style Launcher
Description=Launcher simulating the menu from Mass Effect 2
Tags=Mass Effect | Launcher
Instructions=Left clic on cerber's logo minimize menu. Middle clic - refresh.
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0

@include="#SKINSPATH#\swLauncher\Applications.txt"

[Variables]
;  ColorActive
ColorA=255,156,91
;  ColorPassive
ColorP=0,255,255

;MouseLeaveAction=!Execute [!RainmeterRedraw] 

FontFace=New Rocker

;////////////////////////////////////////
;  ROUNDLINES
;////////////////////////////////////////


[MeasureTime]
Measure=Time

[MeasureTime3]
Measure=Calc
Formula=MeasureTime2*2

[MeasureTime2]
Measure=Time
InvertMeasure=1

[MeasureCircle]
Measure=Calc
Formula=1

[MeterROUNDLINE1]
Meter=ROUNDLINE
MeasureName=MeasureCircle
X=248
Y=153

H=152
LineStart=130
LineLength=152
LineColor=#ColorP#,128
LineWidth=20
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832

AntiAlias=1
Solid=1
[MeterROUNDLINE2]
Meter=ROUNDLINE
MeasureName=MeasureCircle
X=248
Y=153

H=152
LineStart=77
LineLength=90
LineColor=#ColorP#,100
LineWidth=20
AntiAlias=1
StartAngle=0
RotationAngle=6.2832

AntiAlias=1
Solid=1

;Meter=ROUNDLINE
MeasureName=MeasureCircle
X=248
Y=153

H=152
LineStart=155
LineLength=159
LineColor=#ColorP#,80
LineWidth=20
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832

AntiAlias=1
Solid=1

;[MeterROUNDLINE4]
Meter=ROUNDLINE
MeasureName=MeasureCircle
X=248
Y=153

H=152
LineStart=53
LineLength=67
LineColor=#ColorP#,80
LineWidth=20
AntiAlias=1
StartAngle=4.7124
RotationAngle=6.2832

AntiAlias=1
Solid=1

;[MeterRotator1]
Meter=Rotator
MeasureName=MeasureTime2
X=248
Y=228

ImageName=rotor.png

StartAngle=0
RotationAngle=6.2832

AntiAlias=1
ValueRemainder=60

;[MeterRotator2]
Meter=Rotator
MeasureName=MeasureTime
X=248
Y=228

ImageName=rotor2.png

StartAngle=5
RotationAngle=6.2832

AntiAlias=1
ValueRemainder=30

;[MeterRotator3]
Meter=Rotator
MeasureName=MeasureTime
X=248
Y=228

ImageName=rotor3.png

StartAngle=2
RotationAngle=6.2832

AntiAlias=1
ValueRemainder=200

;Meter=Rotator
MeasureName=MeasureTime3
X=248
Y=228

ImageName=rotor4.png

StartAngle=3
RotationAngle=6.2832

AntiAlias=1
ValueRemainder=50

;[Background]
Meter=Image
ImageName=Background.png
X=75
Y=20
;////////////////////////////////////////
;  BUTTONS
;////////////////////////////////////////

[MeasureButtonName]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName="#SKINSPATH#\Mass Effect\Launcher\Applications.txt"

[LeftCenter]
Meter=BUTTON
X=60
Y=155
ButtonImage=11.png
MouseOverAction=!Execute [!ShowMeter NameButtonLeftCenterOver][!HideMeter NameButtonLeftCenter] 
MouseLeaveAction=!Execute [!HideMeter NameButtonLeftCenterOver][!ShowMeter NameButtonLeftCenter] [!RainmeterRedraw] 
ButtonCommand=!Execute ["E:\Program Files\Streamlabs OBS\Streamlabs OBS.exe"]

[NameButtonLeftCenter]
Meter=STRING
X=-55r
Y=65r
Text=SLOBS
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#0
AntiAlias=1
StringAlign=left

[NameButtonLeftCenterOver]
Meter=STRING
X=-1r
Y=r
Text=SLOBS
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=left
Hidden=1

[RightCenter]
Meter=BUTTON
X=395
Y=155
ButtonImage=12.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonRightCenterOver][!RainmeterHideMeter NameButtonRightCenter]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonRightCenterOver][!RainmeterShowMeter NameButtonRightCenter]
ButtonCommand=!Execute ["E:\Users\David\AppData\Local\Programs\GIMP 2\bin\gimp-2.10.exe"]

[NameButtonRightCenter]
Meter=STRING
X=445
Y=219
Text=GIMP
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#
AntiAlias=1
StringAlign=left

[NameButtonRightCenterOver]
Meter=STRING
X=1r
Y=r
Text=GIMP
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=left
Hidden=1


[ButtonLeft1]
Meter=BUTTON
X=115
Y=40
ButtonImage=4.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonLeft1Over] [!HideMeter NameButtonLeft1]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonLeft1Over][!ShowMeter NameButtonLeft1]
ButtonCommand=!Execute ["E:\Program Files\LibreOffice\program\soffice.exe"]


[NameButtonLeft1]
Meter=STRING
X=60
Y=40
Text="LibreOffice"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#
AntiAlias=1
StringAlign=left
Hidden=1

[NameButtonLeft1Over]
Meter=STRING
X=-1r
Y=r
Text="LibreOffice"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=left
Hidden=1

[ButtonRight1]
Meter=BUTTON
X=275
Y=40
ButtonImage=8.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonRight1Over][!RainmeterHideMeter NameButtonRight1]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonRight1Over][!RainmeterShowMeter NameButtonRight1]
ButtonCommand=!Execute ["E:\Program Files (x86)\Audacity\audacity.exe"]



[NameButtonRight1]
Meter=STRING
X=345
Y=r
Text="Audacity"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#
AntiAlias=1
StringAlign=left
Hidden=1


[NameButtonRight1Over]
Meter=STRING
X=1r
Y=r
Text="Audacity"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=left
Hidden=1

[Buttonleft2]
Meter=BUTTON
X=105
Y=140
ButtonImage=3.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonLeft2Over][!RainmeterHideMeter NameButtonLeft2]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonLeft2Over][!RainmeterShowMeter NameButtonLeft2]
ButtonCommand=!Execute ["E:\Program Files\obs-studio\bin\64bit\obs64.exe"] 



[NameButtonLeft2]
Meter=STRING
X=r
Y=135
Text="OBS Studio"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#
AntiAlias=1
StringAlign=right
Hidden=1

[NameButtonLeft2Over]
Meter=STRING
X=-1r
Y=r
Text="OBS Studio"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=right
Hidden=1


[Buttonright2]
Meter=BUTTON
X=295
Y=140
ButtonImage=7.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonRight2Over][!RainmeterHideMeter NameButtonRight2]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonRight2Over][!RainmeterShowMeter NameButtonRight2]
ButtonCommand=!Execute ["E:\Program Files (x86)\FormatFactory\FormatFactory.exe"]



[NameButtonRight2]
Meter=STRING
X=385
Y=130
Text="FormatFactory"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#
AntiAlias=1
StringAlign=left
Hidden=1

[NameButtonRight2Over]
Meter=STRING
X=1r
Y=r
Text="FormatFactory"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=left
Hidden=1

[Buttonleft3]
Meter=BUTTON
X=105
Y=230
ButtonImage=2.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonLeft3Over][!RainmeterHideMeter NameButtonLeft3]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonLeft3Over][!RainmeterShowMeter NameButtonLeft3] 
ButtonCommand=!Execute ["E:\Program Files\obs-studio\bin\64bit\obs64.exe"]


[NameButtonLeft3]
Meter=STRING
X=25
Y=300
Text="SEOBS.Live"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#
AntiAlias=1
StringAlign=left
Hidden=1

[NameButtonLeft3Over]
Meter=STRING
X=-1r
Y=r
Text="SEOBS.Live"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=left
Hidden=1

[ButtonRight3]
Meter=BUTTON
X=295
Y=230
ButtonImage=6.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonRight3Over][!RainmeterHideMeter NameButtonRight3]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonRight3Over][!RainmeterShowMeter NameButtonRight3] 
ButtonCommand=!Execute [“E:\Program Files\Rainmeter\Rainmeter.exe”]



[NameButtonRight3]
Meter=STRING
X=90r
Y=70r
Text="Rainmeter.exe"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#
AntiAlias=1
StringAlign=left
Hidden=1

[NameButtonRight3Over]
Meter=STRING
X=1r
Y=r
Text="Rainmeter.exe"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=left
Hidden=1

[Buttonleft4]
Meter=BUTTON
X=120
Y=300
ButtonImage=1.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonLeft4Over][!RainmeterHideMeter NameButtonLeft4]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonLeft4Over][!RainmeterShowMeter NameButtonLeft4]  
ButtonCommand=!Execute ["C:\Users\David\AppData\Roaming\Zoom\bin\Zoom.exe"]



[NameButtonLeft4]
Meter=STRING
X=155
Y=95r
Text="Zoom"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#
AntiAlias=1
StringAlign=Right
Hidden=1

[NameButtonLeft4Over]
Meter=STRING
X=-1r
Y=r
Text="Zoom"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=Right
Hidden=1

[Buttonright4]
Meter=BUTTON
X=275
Y=300
ButtonImage=5.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonRight4Over][!RainmeterHideMeter NameButtonRight4]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonRight4Over][!RainmeterShowMeter NameButtonRight4]  
ButtonCommand=!Execute [“C:\F Drive\Projects\Tools\Q-Dir.lnk"][!RainmeterShowMeter NameButtonRight4]  




[NameButtonRight4]
Meter=STRING
X=65r
Y=95r
Text="Q-Dir"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorP#
AntiAlias=1
StringAlign=left
Hidden=1

[NameButtonRight4Over]
Meter=STRING
X=1r
Y=r
Text="Q-Dir"
FontFace=#FontFace#
FontSize=12
FontColor=#ColorA#
AntiAlias=1
StringAlign=left
Hidden=1

;-----------------------------------------


[bg]
Meter=IMAGE
X=60
Y=-5
ImageName=bg.png

[top]
Meter=BUTTON
X=175
Y=0
ButtonImage=9.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonTopLeftOver][!RainmeterHideMeter NameButtonTopLeft]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonTopLeftOver][!RainmeterShowMeter NameButtonTopLeft]
ButtonCommand=!Execute ["C:\F Drive\Projects\DTS"]


[NameButtonTopLeft]
Meter=STRING
X=95r
Y=75r
Text=DTS
FontFace=#FontFace#
FontSize=14
FontColor=#ColorP#
AntiAlias=1
StringAlign=Right
Hidden=1

[NameButtonTopLeftOver]
Meter=STRING
X=r
Y=1r
Text=DTS
FontFace=#FontFace#
FontSize=14
FontColor=#ColorA#
AntiAlias=1
StringAlign=Right
Hidden=1

[bottom]
Meter=BUTTON
X= -86r
Y= 318r
ButtonImage=10.png
MouseOverAction=!Execute [!RainmeterShowMeter NameButtonBottomOver][!RainmeterHideMeter NameButtonBottom]
MouseLeaveAction=!Execute [!RainmeterHideMeter NameButtonBottomOver][!RainmeterShowMeter NameButtonBottom]
ButtonCommand=!Execute ["E:\Program Files (x86)\Audials\MusicTube 2021\AudialsPlayer.exe"]




[NameButtonBottom]
Meter=STRING
X=17r
Y=-35r
Text=MusicTube
FontFace=#FontFace#
FontSize=14
FontColor=#ColorP#
AntiAlias=1
StringAlign=left
Hidden=1

[NameButtonBottomOver]
Meter=STRING
X=r
Y=-1r
Text=MusicTube
FontFace=#FontFace#
FontSize=14
FontColor=#ColorA#
AntiAlias=1
StringAlign=left
Hidden=1