It is currently April 19th, 2024, 5:33 am

Click to Open picture in default photo viwer [New user]

Get help with creating, editing & fixing problems with skins
lrivers002
Posts: 2
Joined: March 21st, 2019, 12:02 am

Click to Open picture in default photo viwer [New user]

Post by lrivers002 »

I'm pretty much a brand new user and a looking for someone to point me in the right direction when it comes to editing skins properly. I have been looking at some photo viewer/slideshow skins and basically want to tweak one to do what another can. The StickyPic skin has an option to click a button to open the current pic in the default photo viewer, but a polaroid skin i found cannot. Can anyone help? I will post the skin I would like to edit:

Code: Select all

[Rainmeter]
BackgroundMode=1
Author=Philarete
AppVersion=13000
Update=30000

[RandomImage]
Measure=Plugin
Plugin=Plugins\QuotePlugin.dll
PathName="C:\Users\larry\Pictures"
FileFilter=*.jpg;*.jpeg;*.gif;*.bmp
Subfolders=1

[MeterBack]
Meter=IMAGE
X=0
Y=0
ImageName=polaroid.png

[Image]
MeasureName=RandomImage
Meter=IMAGE
X=40
Y=36
W=179
H=139
LeftMouseDownAction=!Execute ["#CURRENTPATH#WallpaperChanger.exe" "[RandomImage]" 1]
Hidden=0

[Refresh1]
Meter=IMAGE
X=48
Y=43
ImageName=refresh.png
Hidden=1

[Refresh2]
Meter=IMAGE
X=48
Y=43
ImageName=refresh.png
Hidden=1

[Refresh]
Meter=IMAGE
X=10
Y=10
W=24
H=22
SolidColor=255, 0, 0, 0
MouseOverAction=!Execute [!RainmeterShowMeter Refresh1][!RainmeterRedraw]
LeftMouseDownAction=!Execute [!RainmeterShowMeter Refresh2][!RainmeterRedraw]
LeftMouseupAction=!Execute [!RainmeterHideMeter Refresh2][!RainmeterRedraw][!RainmeterRefresh "Enigma Based\Picture Frame"]
MouseLeaveAction=!execute [!RainmeterHideMeter Refresh1][!RainmeterHideMeter Refresh2][!RainmeterRedraw]

[InnerShadow]
Meter=IMAGE
X=40
Y=36
ImageName=innershadow.png
Last edited by eclectic-tech on March 21st, 2019, 1:33 am, edited 1 time in total.
Reason: Please use code tags. It is the </> symbol.
mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Click to Open picture in default photo viwer [New user]

Post by mak_kawa »

I think LeftMouseUpAction=[%1] in [Image] measure.

I have no idea for the line LeftMouseDownAction=!Execute ["#CURRENTPATH#WallpaperChanger.exe" "[RandomImage]" 1]. You want to change wallpaper by simple mouse click-down? If so, click-down-up action executes wallpaper change too, I think.
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Click to Open picture in default photo viwer [New user]

Post by balala »

mak_kawa wrote: March 21st, 2019, 1:03 am I think LeftMouseUpAction=[%1] in [Image] measure.
Won't work this way, because within an Image meter you can't refere to the measure introduced with the MeasureName option, with %1. But modifying a bit the LeftMouseUpAction option, it will. Use the following one: LeftMouseUpAction=["[RandomImage]"]
mak_kawa wrote: March 21st, 2019, 1:03 am I have no idea for the line LeftMouseDownAction=!Execute ["#CURRENTPATH#WallpaperChanger.exe" "[RandomImage]" 1]. You want to change wallpaper by simple mouse click-down? If so, click-down-up action executes wallpaper change too, I think.
I suppose WallpaperChanger.exe is an app used to change the wallpaper, right?
If so, there is no need to use an external executable for this, Rainmeter can do this natively, using the !SetWallpaper bang. Replace the above bang with the following one: [!SetWallpaper "[RandomImage]"]. If needed, you can add a second parameter after [RandomImage], to set the position of the wallpaper as well. For example with [!SetWallpaper "[RandomImage]" "Center"] you can center the wallpaper. You can find the valid values for this parameter on the above posted link.
However I don't consider using both bangs is a good idea. I mean with both above described bangs, when you click the image it will be open and in same time set as wallpaper. Maybe you will want to use a second meter (a button, for example), to set the wallpaper. This way clicking the image opens it in the default image viewer, while clicking the button sets it as wallpaper. Much better, in my opinion.

And a detail: don't use the !Execute bang. It is deprecated. You can simply get rid of it.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Click to Open picture in default photo viwer [New user]

Post by jsmorley »

balala wrote: March 21st, 2019, 1:42 pm Won't work this way, because within an Image meter you can't refere to the measure introduced with the MeasureName option, with %1. But modifying a bit the LeftMouseUpAction option, it will. Use the following one: LeftMouseUpAction=["[RandomImage]"]
To be clear, you can reference a measure bound to an Image meter with MeasureName using the %1, %2... tokens, but only in the ImageName option of the meter. You can never use these tokens in !Bangs, not in a an Image meter, nor in ANY meter type. There is no connection between "actions" and their corresponding "bangs" and any measure bound to any meter.

MeasureName(N), and the associated %1, %2... tokens, are a way of "binding" measure(s) to the core functionality of a meter. That is for instance Text on a String meter, and ImageName on an Image meter. The %1, %2... tokens are a way of incorporating the measure value bound to a meter with additional attributes to be used in conjunction. The most basic examples are Text=The value of the measure is %1 just now... on a String meter, or ImageName=ImageNumber%1.jpg on an Image meter.

Measures "bound" to meters with MeasureName are never recognized by the various mouse "action" options supported on a meter.

The only outlier to this is the ToolTip option, which is specifically designed to recognize the tokens bound to the meter with MeasureName.

Make no mistake, Balala is entirely correct in his solution. I just wanted to be clear why this is so.
lrivers002
Posts: 2
Joined: March 21st, 2019, 12:02 am

Re: Click to Open picture in default photo viwer [New user]

Post by lrivers002 »

The original skin does change the wallpaper to whatever picture is clicked, which is what I am hoping to change to just opening said picture in the default picture viewer like some other skins are able to do.
Sorry I'm so new, I need to go through and learn all the terminology and basics. I've been basically dabbling simple things like color changing and stuff.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Click to Open picture in default photo viwer [New user]

Post by jsmorley »

lrivers002 wrote: March 21st, 2019, 10:40 pm The original skin does change the wallpaper to whatever picture is clicked, which is what I am hoping to change to just opening said picture in the default picture viewer like some other skins are able to do.
Sorry I'm so new, I need to go through and learn all the terminology and basics. I've been basically dabbling simple things like color changing and stuff.
Don't worry, you are doing fine, and it will come with a little time.

We have all been there... I started out by installing an early version of Rainmeter, probably 10 years ago, and simply trying to figure out how to change the background image used in the default "Tranquil" skins that came with it. Which still works by the way, due to our insistence on backwards compatibility...


1.png


That may be the best way to learn, just take some existing skin and see if you can slowly, one step at a time, change it to something of your own. Once you have done that a bit, then you can start creating from scratch.
You do not have the required permissions to view the files attached to this post.