It is currently April 27th, 2024, 1:39 am

Selecting a path with a meter?

Get help with creating, editing & fixing problems with skins
thetintanman
Posts: 3
Joined: October 25th, 2018, 10:31 pm

Selecting a path with a meter?

Post by thetintanman »

Hi, I'm currently making a launcher skin, and I'm wondering if its possible to select a path by clicking a meter, and link it to a shape, so that I could go to that path the next time I click it. It doesn't seem possible to me, but I'd like to know it that's true or not.
Thanks.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Selecting a path with a meter?

Post by eclectic-tech »

thetintanman wrote: October 25th, 2018, 11:19 pm Hi, I'm currently making a launcher skin, and I'm wondering if its possible to select a path by clicking a meter, and link it to a shape, so that I could go to that path the next time I click it. It doesn't seem possible to me, but I'd like to know it that's true or not.
Thanks.
Really need a few more details to be able to help.
You can use !SetOption to set/change any value in any meter or measure.

Is your launcher meter an image meter or a string meter?

What do you mean by "link it to a shape'? Is "shape" an image or a shape meter or what?

From what you generally described, all of that is possible, but without specific examples, I doubt anyone can give you a specific answer. :uhuh:
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Selecting a path with a meter?

Post by balala »

Completely agree with eclectic-tech, however I'd add just one sample code:

Code: Select all

[MeterSelect]
Meter=...
X=0
Y=0
...
LeftMouseUpAction=[!SetOption MeterShape LeftMouseUpAction "C:\Windows\Notepad.exe"][!UpdateMeter "MeterShape"]

[MeterShape]
Meter=Shape
X=0r
Y=3R
...
Note the followings: [MeterShape] initially doesn't have set a LeftMouseUpAction option, so you can't click it. But when you click [MeterSelect], it sets up the posted LeftMouseUpAction option to [MeterShape] and after this moment you can click [MeterShape], to open Notepad. Obviously this is just a generic example you have to modify the last parameter of the !SetOption option, to meet your needs, as eclectic-tech said, not being precised what would you like to achieve, more then this is hard to be said.
thetintanman
Posts: 3
Joined: October 25th, 2018, 10:31 pm

Re: Selecting a path with a meter?

Post by thetintanman »

Sorry for the vague description. Specifically, I want to have a settings skin composed mainly of shape meters that opens when I click the shape meter of the launcher skin. This settings skin would allow you to input a desired path/link, and assign it to a specific shape meter of the launcher skin, replacing whatever the original path/link was without having to manually changing the code. I've looked for similar examples, but I never exactly did, so I was wondering if this was possible.

Thanks again.
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Selecting a path with a meter?

Post by balala »

thetintanman wrote: October 26th, 2018, 8:55 pm Sorry for the vague description. Specifically, I want to have a settings skin composed mainly of shape meters that opens when I click the shape meter of the launcher skin. This settings skin would allow you to input a desired path/link, and assign it to a specific shape meter of the launcher skin, replacing whatever the original path/link was without having to manually changing the code. I've looked for similar examples, but I never exactly did, so I was wondering if this was possible.
Please take a look at the attached skin. I'm not sure I completely understood what would you like, so maybe in some parts the skin isn't exactly what you would need, but let me know if it indeed isn't, to fix the issues.
When you install the package, you'll get a Main.ini skin loaded. As its name says, this is the main skin, with three Shape meters, used as buttons, to launch some paths. These path are stored as three variable, into the @Resources\Settings folder. Beside the three Shapes (used as launching buttons), you also get a Settings Button (in fact a String meter), which when clicked, loads the Settings.ini skin. In this one, you can set the three paths, one by one, through an InputText plugin measure, by clicking the appropriate string (One, Two or Three). When you set one or more path, you have to click OK, to "transfere" the newly set variables into the Main.ini skin (obviously, if you click Cancel, the settings will be lost).
Please check the skin and let me know if anything doesn't match your needs, to correct it.
You do not have the required permissions to view the files attached to this post.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: Selecting a path with a meter?

Post by Mor3bane »

theintanman -
Just so that balala's answer does not seem overwrought - the path has to come from somewhere, so it seems balala opted to enter the path in a text format.

There is a !setclip bang but it relies again on the string value coming from somewhere. the windows right-click copy/paste sort of does the same thing.

In combination with !writekeyvalue and !setclip there may be a "dark arts" way a path can be captured but to me the textbox method makes sense right now.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
thetintanman
Posts: 3
Joined: October 25th, 2018, 10:31 pm

Re: Selecting a path with a meter?

Post by thetintanman »

Sorry for the late reply, but thank you so much! This is definitely what I was looking for in regards to my launcher skin.

I do have another request and issue with the skin though. First off, I'd appreciate it you could elaborate on the different meters at work in the skin (or link any resources to refer to) to apply it to my launcher skin.

As for the issue, I found that the skin can only open an application if it's in its own folder. If it's in a more general folder with a bunch of other applications, the skin doesn't work. For example, a path like C:\ProgramData\Microsoft\Windows\Start Menu\Programs\iTunes\iTunes will work with the skin, but a path like C:\ProgramData\Microsoft\Windows\Start Menu\Programs\paint.net won't work at all. Although it's not a major issue, I would appreciate it if I knew it could be fixed.

Once again, thanks for the help!
User avatar
balala
Rainmeter Sage
Posts: 16174
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Selecting a path with a meter?

Post by balala »

thetintanman wrote: October 31st, 2018, 8:04 pm This is definitely what I was looking for in regards to my launcher skin.
I'm glad. However firstly it's your merit, finally you wrote the code, I just added the ActionTimer plugin measure and the needed other options.
thetintanman wrote: October 31st, 2018, 8:04 pm As for the issue, I found that the skin can only open an application if it's in its own folder. If it's in a more general folder with a bunch of other applications, the skin doesn't work. For example, a path like C:\ProgramData\Microsoft\Windows\Start Menu\Programs\iTunes\iTunes will work with the skin, but a path like C:\ProgramData\Microsoft\Windows\Start Menu\Programs\paint.net won't work at all. Although it's not a major issue, I would appreciate it if I knew it could be fixed.
First make sure the posted paths are working. Try them out. Open Start, type Run and open the Run app. Type or paste the path and click OK. Does the appropriate program (iTunes or Paint.net) launches?
If they do, how have you added them to the code of the appropriate meters ([Dropdown1], [Dropdown2] and so on)?