It is currently May 2nd, 2024, 12:21 pm

How to add shortcut for program or Hyper-link

Get help with creating, editing & fixing problems with skins
Marda
Posts: 1
Joined: January 10th, 2012, 6:54 pm

How to add shortcut for program or Hyper-link

Post by Marda »

Hi!
I recently this day started using Rainmeter, and I love it! All that is missing though is a way to access a game through the desktop and the same thing but with a hyperlink. Please help, would mean a lot! :)

EDIT: Forgot to add that I'm using the Omnimos or something, if that matters ^^.
Last edited by Marda on January 10th, 2012, 7:13 pm, edited 1 time in total.
User avatar
Brian
Developer
Posts: 2689
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: How to add shortcut for program or Hyper-link

Post by Brian »

Check out !Execute.

You could use a something like: LeftMouseUpAction=!Execute ["C:/Games/Game.exe"] in an image meter.
Just change the path to your game path. :D

-Brian
guywhoisdumb
Posts: 3
Joined: January 10th, 2012, 11:28 pm

Re: How to add shortcut for program or Hyper-link

Post by guywhoisdumb »

Could someone please exactly how to implement this. I don't understand how to use the !bangs. If i want to make it so I could click an icon in the skin to open Firefox, what exactly should i do? I'd really like to know cause I have not been able to find the method required anywhere else.
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: How to add shortcut for program or Hyper-link

Post by Mordasius »

I think you should start by reading Rainmeter101-EditingSkins and then the Rainmeter101-SkinTutorials to get a feel for how Rainmeter skins work. You'll soon see that a basic meter for launching Firefox can be as simple as this:

Code: Select all

[MeterToRunFirefox]
Meter=Image
ImageName=Firefox.png
LeftMouseUpAction=!Execute ["C:\Program Files (x86)\Mozilla Firefox 9.0\Firefox.exe"]
You will of course need to supply the Firefox.png file and replace "C:\Program Files (x86)\Mozilla Firefox 9.0\Firefox.exe" with the correct path to your version of Firefox.
scottiescotsman
Posts: 54
Joined: June 10th, 2013, 2:22 am

Re: How to add shortcut for program or Hyper-link

Post by scottiescotsman »

I know you said in an image meter but what if I just have text and no png like

Code: Select all

[meterLabelSG]
-----------------------------------------------------------------------------
Meter=STRING
MeterStyle=LeftStyle
FontColor=255,255,255
FontSize=#ts1#
X=#tx#
Y=(581 + #OffSet#)
Text="Speed Grade"
DynamicVariables=1
just wanted like a hyperlink effect with a !bang for leftmouseUp ..

hope you can help :)
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: How to add shortcut for program or Hyper-link

Post by mak_kawa »

Not sure what you exactly want...but maybe this is the solution?

Code: Select all

[meterLabelSG]
Meter=STRING
MeterStyle=LeftStyle
FontColor=255,255,255
FontSize=#ts1#
X=#tx#
Y=(581 + #OffSet#)
Text="Speed Grade"
DynamicVariables=1
InlineSetting=
InlinePattern=.*
MouseOverAction=[!SetOption meterLabelSG InlineSetting Underline][!Update][!Redraw]
MouseLeaveAction=[!SetOption meterLabelSG InlineSetting ""][!Update][!Redraw]
LeftMouseUpAction=["http://(somewhere)"]
scottiescotsman
Posts: 54
Joined: June 10th, 2013, 2:22 am

Re: How to add shortcut for program or Hyper-link

Post by scottiescotsman »

Thanks for the heads up :)
Tried the option bangs but underline didn't work but the mouseupAction did :)

Thanks
Steven
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to add shortcut for program or Hyper-link

Post by jsmorley »

scottiescotsman wrote:Thanks for the heads up :)
Tried the option bangs but underline didn't work but the mouseupAction did :)

Thanks
Steven
...
InlineSetting=None
InlinePattern=.*
MouseOverAction=[!SetOption meterLabelSG InlineSetting "Underline"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption meterLabelSG InlineSetting "None"][!UpdateMeter *][!Redraw]
LeftMouseUpAction=["http://(somewhere)"]

Should work, assuming you are using at least Rainmeter 3.3.2
gif.gif
Note, it's a bad idea to use "" when using !SetOption to set an InlineSetting to "nothing". That doesn't set it to nothing, but actually entirely removes the option. That can cause some head scratching if you later add other InlineSettingN options to the same meter and they don't work, since there can't be "missing" numbers of InlineSettingN options. Use InlineSettingN=None instead, or set InlinePatternN=^$.

Also, as an aside, using !Update along with !Redraw makes no sense. There is a redraw already at the end of each update cycle, there is no point in doing it twice. You will find you won't use !Update (force a complete skin update) very often at all.use !UpdateMeasure, !UpdateMeter and !Redraw as needed to force immediate update of desired skin components. !Update is very brute-force, and in many if not most cases, you will find it more efficient to target the "update right now" commands at specific measures or meters, measure or meter groups, or even just all using !UpdateMeasure "*" or !UpdateMeter "*". !Redraw should always (and only) follow any !UpdateMeter or !UpdateMeterGroup. It is useless at best anywhere else.
You do not have the required permissions to view the files attached to this post.
User avatar
balala
Rainmeter Sage
Posts: 16194
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: How to add shortcut for program or Hyper-link

Post by balala »

jsmorley wrote:!Redraw should always (and only) follow any !UpdateMeter or !UpdateMeterGroup. It is useless at best anywhere else.
A question about this: beside using !Redraw along with !UpdateMeter or !UpdateMeterGroup, isn't a good practice to also use it with !ShowMeter / !HideMeter / !ToggleMeter? For example something like: LeftMouseUpAction=[!ShowMeter "AnyMeter"][!Redraw]. It is desirable, or neither in this case the !Redraw make no sense?
Thanks.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: How to add shortcut for program or Hyper-link

Post by mak_kawa »

Hi jsmorley.

I have missed "None" option in the document about IinlineSetting of RM4.0beta. InlineSetting="" is my resort, but really bad idea as you said. Sorry.