It is currently April 27th, 2024, 8:54 am

HALP?

Get help with creating, editing & fixing problems with skins
MisterJohn
Posts: 3
Joined: March 30th, 2011, 2:58 am

HALP?

Post by MisterJohn »

Hi, I'm new to Rainmeter and I need some help.
I want to make a piece of text that opens a program when I click on it to replace my desktop icons. I know there are plenty of skins out there that already do this, but I want to be able to do this myself.
Any and all help will be appreciated. Thanks!
User avatar
santa_ryan
Posts: 397
Joined: June 22nd, 2010, 4:11 am

Re: HALP?

Post by santa_ryan »

Note: Anything thats surrounded by asterisks (*) can be changed as you see fit.

Ill give you want you need to do what your asking for, but I won't give you it in an organized pre made way, as from what I gather from your post you want to know HOW to do it and not be a script kiddie. (;

Your going to need a String Meter

Code: Select all

[*NAME OF METER*]
Meter=String
from there on the string meter your going to need text so...

Code: Select all

Text=*SOME PROGRAM NAME*
After that your going to need to set the font, font color, font size, etc.

Code: Select all

FontFace=*FONT NAME*
FontColor=*SOME R,G,B,A OR HEX COLOR CODE*
FontSize=*SOME POSITIVE INTEGER*
Then you need to have a way to click on that text and open the program you want.

Theres 2 ways to do this and then you have 11 to trigger the event. So all in all you have 22 ways of doing what you want. However, only 1 of the ways to do it are actually practical and only 6 of those triggers are typically used in this situation. (More on this later)

http://rainmeter.net/cms/MouseActions

you can either set a MouseAction on the string itself (Which isn't recommended).
E.G

Code: Select all

[App1]
Meter=String
Text=*SOME TEXT*
FontFace=Times New Roman
FontSize=12
FontColor=0,0,0,255
LeftMouseUpAction=!Execute [*PROGRAM*]
Try clicking on that string, and you'll find just how hard it is to do it, and so it's typically frowned upon (;

Another way is to make a background for text thats "Invisible" for all sakes and purposes of rainmeter and your eye. You do this by making an Image Meter behind the string, or, if you want a background for the string, you can change SolidColor to a color (255,0,255,255 is solid purple with no transparency for example) instead of 0,0,0,1 which is "Invisible"

Code: Select all

[*APP1BACKGROUNDNAME*]
Meter=Image
SolidColor=0,0,0,1
You'll have to define the X and Y coordinates and the Width and Height with W and H respectively so that it matches up with the background. I suggest you keep the SolidColor to a visible color until you have it aligned how you want it, then change it to 0,0,0,1 or the color you wish.

Code: Select all

X=
Y=
H=
W=
Note: If X is zero you can leave out that section and same goes for Y. However, H and W always have to be defined with solidcolor. If you use an image by using ImageName instead of SolidColor, if you do not define H and W then it will retain the original size of the image.

After that the viable Mouse buttons are:
LeftMouseUpAction
RightMouseUpAction
MiddleMouseUpAction
LeftMouseDoubleClickAction
RightMouseDoubleClickAction
MiddleMouseDoubleClickAction

I say their the only viable ones because using the Down action prevents you from moving the skin without executing the !Bang thats associated with it, which in this case will be a program... It's no good trying to move a skin but unable to do so because your internet browser keeps popping up for instance...

And the MouseOver/MouseLeave action will make it quite annoying to work around those skins... (=

so our image meter will look something like this

Code: Select all

[*METER NAME*]
Meter=Image
SolidColor=*0,0,0,1*
W=*100*
H=*15*
*LeftMouseUpAction*=!Execute ["*APP1 EXECUTABLE*"]

Now, we need to place this image BEHIND the actual text. Rainmeter "Draws" the items from the back to the front based on the order the meters are in the ini file. So the first meter of the ini is actually the "Lowest" layer of the skin when drawn and the last meter is the exact opposite, and is the "Front" layer.

That being said, the image that we just made needs to be put above the string meter in the ini otherwise the image will be drawn over the string and that's no good... lol

All in all your basic skin will look something like this if for instance you wanted Internet Explorer...

Code: Select all

[App1Background]
[App1Background]
Meter=IMAGE
SolidColor=0,0,0,160
W=160
H=27
AntiAlias=1
LeftMouseUpAction=!Execute ["C:\Program Files\Internet Explorer\iexplore.exe"]

[App1Name]
Meter=String
Text=Internet Explorer
FontFace=Times New Roman
FontSize=16
FontColor=255,255,255,255
AntiAlias=1

Last edited by santa_ryan on March 31st, 2011, 12:07 am, edited 1 time in total.
I have three rules when I'm trying to help you.
  • Don't get mad when you don't understand something
  • Be VERY specific with what you ask for.
    The more specific you are, the higher the quality of support you receive.
  • Do not just copy and paste what I put in examples and come back saying it doesn't work.
    It does work, but I purposely left blanks that you need to fill for your specific needs.
MisterJohn
Posts: 3
Joined: March 30th, 2011, 2:58 am

Re: HALP?

Post by MisterJohn »

THANK YOU! :D
Trying this now.
MisterJohn
Posts: 3
Joined: March 30th, 2011, 2:58 am

Re: HALP?

Post by MisterJohn »

Alright, IT WORKS!
Also, I went around the problem of the hard to click meter by making it the exact same size and font of the main text,

Code: Select all

[firefox]
Meter=String
Text=firefox
FontFace=Arial Black
FontColor=248,248,255,50
FontSize=25

[App1]
Meter=String
Text=firefox
FontFace=Arial Black
FontSize=25
FontColor=248,248,255,50
LeftMouseUpAction=!Execute ["C:\Program Files\Mozilla Firefox 4.0 Beta 8\firefox.exe"]
Also, is it possible to make the transparency decrese when I mouse over?

EDIT
lol, nevermind I figured it out. Duh. :P