It is currently April 18th, 2024, 12:40 am

Need help with MouseOverAction and !SetOption

Get help with creating, editing & fixing problems with skins
ebennetthill
Posts: 6
Joined: January 14th, 2017, 2:19 am

Need help with MouseOverAction and !SetOption

Post by ebennetthill »

I've been playing with Smurfier's EasySearch (http://smurfier.deviantart.com/art/EasySearch-1-0-390700286) which takes InputText and sends it to one of several search engines.
There is a meterstyle for [Icons] and then Image Meters for the different search engines. I wanted to change the ImageAlpha option for the Image Meters on MouseOver. Here's 4 sections that show what I'm trying to do.

Code: Select all

[Variables]
1=Google
1url=http://www.google.com/search?q=

[InputText]
 Measure=Plugin
 Plugin=InputText
 H=20
 W=190
 X=5
 Y=5
 SolidColor=0,0,0,155
 FontFace=Calibri
 FontSize=11
 FontColor=255,255,255,255
 Command1=["#1url#$UserInput$"] DefaultValue=""
 
 [Icons]
 ImagePath=#@#
 ImageAlpha=200
 AntiAlias=1
 MouseActionCursor=0
 H=20
 W=20
 Y=r
 X=5R
 LeftMouseUpAction=[!WriteKeyValue Variables Search #CURRENTSECTION#][!Refresh]
 
[1]
 Meter=Image
 MeterStyle=Icons
 ImageName=#1#.png
 ToolTipText=Search #1#
 Y=30
 X=5
 MouseOverAction=!SetOption 1 ImageAlpha 255
 MouseLeaveAction=!SetOption 1 ImageAlpha ""
 
The code works great for the searching, but the ImageAlpha doesn't change on MouseOver.
Thanks for any suggestions.
Last edited by ebennetthill on January 14th, 2017, 11:01 pm, edited 1 time in total.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5391
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Need help with MouseOverAction and !SetOption

Post by eclectic-tech »

Changing the alpha from 255 to "" (nothing) will not do anything, because if not set, the default alpha is 255.

Try:

Code: Select all

[1]
 Meter=Image
 MeterStyle=Icons
 ImageName=#1#.png
 ToolTipText=Search #1#
 Y=30
 X=5
 MouseOverAction=[!SetOption 1 ImageAlpha 128][!UpdateMeter *][!Redraw]
 MouseLeaveAction=[!SetOption 1 ImageAlpha 255][!UpdateMeter *][!Redraw]
 
ebennetthill
Posts: 6
Joined: January 14th, 2017, 2:19 am

Re: Need help with MouseOverAction and !SetOption

Post by ebennetthill »

Thank you. I needed the !UpdateMeter and !Redraw. I really don't know exactly when to use them.

I was able to add it to the [Icons] meterstyle and it works fine now.

Code: Select all

 [Icons]
 ImagePath=#@#
 ImageAlpha=200
 AntiAlias=1
 MouseActionCursor=0
 H=20
 W=20
 Y=r
 X=5R
 LeftMouseUpAction=[!WriteKeyValue Variables Search #CURRENTSECTION#][!Refresh]
 MouseOverAction=[!SetOption #CURRENTSECTION# ImageAlpha 255][!UpdateMeter *][!Redraw]
 MouseLeaveAction=[!SetOption #CURRENTSECTION# ImageAlpha ""][!UpdateMeter *][!Redraw]
Thanks for the reply.