It is currently September 16th, 2019, 11:46 am

Hiding an image when a drive is disconnected

Help with creating, editing & fixing problems with skins
User avatar
sl23
Posts: 360
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 8th, 2019, 10:09 pm

Oh, I see what you're saying. No you misunderstand, I'm wondering if it's possible to dynamically change a shortcut to SyMenu depending on the drive letter given to it when plugged in.

For example, you plug the drive in and it's assigned letter E. So you need to make LeftMouseUpAction=E:\SyMenu\SyMenu.exe dynamic to alter if the drive's letter is different when plugged into another PC.

I think I just realised that I got the answer to this in the other thread! I can use #PROGRAMPATH# so problem solved. :thumbup:

EDIT: No I think this isn't possible! I just realised that I'm trying to use a variable for a path for an external drive, but from an internal one. Basically the shortcut, ie RM is on D: but the actual app is on the external drive. There's no way RM could know which drive the shortcut can be directed to. So it's a no-no! :(
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -
User avatar
sl23
Posts: 360
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 12th, 2019, 10:26 pm

I'm sorry for vying for attention so much lately! I need some more help, if possible please. :givelove:

I just seem to be having major problems doing things I want to do! I'm a bit unconventional ;-)

Ok, well, after getting this working I decided to try to minimalise the skin somewhat. I've trimmed some unused stuff and tried to hide things that weren't needed in view constantly.

So I decided to hide the Recycle Bin by only showing it on Hover. As the SyMenu image is next to it it was pointless hiding the RB if SM is still showing. Seeing as when they're hidden, the skin dynamically shrinks by moving any meter's below upwards, thereby removing any blank space left behind.

The problem is that I don't really know how to tackle a double hide scenario! I've come across this before but just gave up!

Here's what happens...
With E Drive connected:
1. Connect Drive or Refresh Skin = SyMenu image shows. Should be hidden.
2. MouseOver skin = SM image still visible and Recycle Bin shows next to it. Correct.
3. MouseLeave = Both images hide as expected. Correct.
With E Drive disconnected:
1. Connect Drive or Refresh Skin = SyMenu image hidden. Correct.
2. MouseOver skin = SM image visible and Recycle Bin shows next to it. Should just be RB, SM should be hidden.
3. MouseLeave = Both images hide as expected. Correct.
The question is how to get it to work with both Hover and connection monitoring?

EDIT: I just had an idea which I tried and got halfway there! :D
I added a command to change the name of the Group=Hover to Group=H. This has disabled the Hover when disconnected. So now I'm getting this...
With E Drive connected:
1. Connect Drive or Refresh Skin = SyMenu image shows. Should be hidden.
2. MouseOver skin = SM image still visible and Recycle Bin shows next to it. Correct.
3. MouseLeave = Both images hide as expected. Correct.
With E Drive disconnected:
1. Connect Drive or Refresh Skin = SyMenu image hidden. Correct.
2. MouseOver skin = SM image visible and Recycle Bin shows next to it. Should just be RB, SM should be hidden.Now works correctly.
3. MouseLeave = Both images hide as expected. Correct.
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -
User avatar
balala
Rainmeter Sage
Posts: 8617
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding an image when a drive is disconnected

balala » August 13th, 2019, 6:14 am

sl23 wrote:
August 12th, 2019, 10:26 pm
Here's what happens...



The question is how to get it to work with both Hover and connection monitoring?

EDIT: I just had an idea which I tried and got halfway there! :D
I added a command to change the name of the Group=Hover to Group=H. This has disabled the Hover when disconnected. So now I'm getting this...
All this doesn't go on for me. Although I don't have the needed images (those used into the [BinImage] and [SyMenu] meters), I used some solid colors to show up the meters and they are not hidden. They are always visible.
I suppose you've made some modifications in your code, which I don't have. If you indeed have did, please post the code as you have it now.
User avatar
sl23
Posts: 360
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 13th, 2019, 9:08 am

Possibly, I'll post the complete skin code later today.
I have been trying to skin this skin down a bit.

Edit,
Actually I'll see if I can figure out how to make a skin package and upload that. That way you have the images.
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -
User avatar
balala
Rainmeter Sage
Posts: 8617
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding an image when a drive is disconnected

balala » August 13th, 2019, 11:34 am

sl23 wrote:
August 13th, 2019, 9:08 am
Actually I'll see if I can figure out how to make a skin package and upload that. That way you have the images.
Open Manage Rainmeter (clicking the Rainmeter icon within the Notification Area) and click the Create .rmskin package button. Follow the steps of the wizard to create the package.
Once the package created, you can upload it here by clicking the Attachments tabe below the field where you write your post, then clicking the Add files button.
User avatar
sl23
Posts: 360
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 13th, 2019, 6:11 pm

Well, I tried to make a skin package using RM, but, sorry, I found this inferior, so I did it manually.
Here it is...
Skins.rmskin
The issues I had with the rmskin packager:
1. It included all skins contained in the chosen folder, I feel you should be able to choose via checkboxes which of these to include.
2. No images were included as they are contained in the Resources folder. A button to add then select which images to include would be good. Obviously keeping the folder structure.
3. Same for Addons.

One other issue I am having that I just don't understand, is how the Refresh button image disappeared when I combined two sections.
It works fine but doesn't show the image at all.
These are the original sections:

Code: Select all

[bRefresh]
Meter=Image
ImageName=#@#Refresh.png
LeftMouseUpAction=[!Refresh]
RightMouseUpAction=[!ToggleConfig "RM\ScreenSaver" "ScreenSaver.ini"]
ToolTipText="L ~ Refresh#CRLF#M ~ ScreenSaver#CRLF#R ~ Toggle  SS-Bg"
UpdateDivider=#UDX#
X=153
Y=8
W=20
H=20

[bSystem]
Meter=Image
MeasureName=mCLabel
MeasureName2=mCFree
MeasureName3=mCTotal
MeasureName4=mDLabel
MeasureName5=mDFree
MeasureName6=mDTotal
MeasureName7=mOSbits
ToolTipTitle="[mOSVersion] - x%7 / [mScreenSize]"
ToolTipIcon=Info
ToolTipText="C:/%1 ~ %2B / %3B#CRLF#D:/%4 ~ %5B / %6B#CRLF#L ~ Task Manager#CRLF#M ~ Device Manager"
LeftMouseUpAction="taskmgr.exe"
MiddleMouseUpAction="devmgmt.msc"
MouseOverAction=[!SetOption bSystem SolidColor "255,255,255,70"] [!UpdateMeter *] [!Redraw]
MouseLeaveAction=[!SetOption bSystem SolidColor ""] [!UpdateMeter *] [!Redraw]
X=3r
Y=8R
W=14
H=14
This is the combination:

Code: Select all

[bRefresh]
Meter=Image
ImageName=#@#Refresh.png
LeftMouseUpAction=[!Refresh]
MiddleMouseUpAction="devmgmt.msc"
UpdateDivider=#UDX#
MeasureName=mCLabel
MeasureName2=mCFree
MeasureName3=mCTotal
MeasureName4=mDLabel
MeasureName5=mDFree
MeasureName6=mDTotal
MeasureName7=mOSbits
ToolTipTitle="[mOSVersion] - x%7 / [mScreenSize]"
ToolTipIcon=Info
ToolTipText="C:/%1 ~ %2B / %3B#CRLF#D:/%4 ~ %5B / %6B#CRLF#L ~ Refresh#CRLF#M ~ Device Manager"
X=153
Y=8
W=20
H=20
Why would the image disappear? I had this problem years before when I created the skin, the only way I could solve it was to create two buttons. If you could solve this annoying little blip I'd be grateful :D

Thanks balala :thumbup:

EDIT: I forgot the "Screensaver" skin! Do you need that? It's only an RM shaded meter, no images. Just to hide background when running Emu's.
You do not have the required permissions to view the files attached to this post.
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -
User avatar
jsmorley
Developer
Posts: 19444
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Hiding an image when a drive is disconnected

jsmorley » August 13th, 2019, 6:55 pm

You simply cannot manually create a .rmskin. Rainmeter will not install it.
User avatar
balala
Rainmeter Sage
Posts: 8617
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding an image when a drive is disconnected

balala » August 13th, 2019, 7:23 pm

sl23 wrote:
August 13th, 2019, 6:11 pm
Well, I tried to make a skin package using RM, but, sorry, I found this inferior, so I did it manually.
I probably know what you mean by "making the package using RM", but what you mean by "doing it manually"? I have no idea...
sl23 wrote:
August 13th, 2019, 6:11 pm
The issues I had with the rmskin packager:
1. It included all skins contained in the chosen folder, I feel you should be able to choose via checkboxes which of these to include.
2. No images were included as they are contained in the Resources folder. A button to add then select which images to include would be good. Obviously keeping the folder structure.
3. Same for Addons.
1. Exactly. This is one of the essence of the skin installer. There is no need to can choose the skins manually. All skins contained into a config belong to that config and MUST be contained by the installer. In many cases they are related to each other and makes not too much sense to include some and exclude the others.
2. The @Resources folder was added to the installer, it is there, I see it. As such, its whole content was included, including all images. I doubt any of them was removed when you've created the installer.
3. Same for addons.
sl23 wrote:
August 13th, 2019, 6:11 pm
Why would the image disappear? I had this problem years before when I created the skin, the only way I could solve it was to create two buttons. If you could solve this annoying little blip I'd be grateful :D
Because on the original [bRefresh] meter you had an ImageName option, which was used by the meter to show the appropriate image. But when you combined those two meters, you have ported both, the ImageName option (from the old [bRefresh] meter) and the whole set of MeasureName options (from the old [bSystem] meter), having them all in the new [bRefresh] meter. In a such case MeasureName overrides the ImageName and the meter wants to show the image returned by the measure used into the MeasureName measure. In your case this is [mCLabel], but this measure doesn't return a path of an image. That's why the [bRefresh] meter doesn't show up nothing. You have all these described into the Note here.
If you want the meter to keep showing the Refresh.png image, remove all MeasureName options (all of MeasureName - MeasureName7 options) from the new [bRefresh] meter, especially that they can't be used nor into the ToolTipTitle, nor into the ToolTipText option. Both these options have to be written adding the measures names explicitly into the options, plus adding a DynamicVariables=1 option:

Code: Select all

[bRefresh]
Meter=Image
ImageName=#@#Refresh.png
LeftMouseUpAction=[!Refresh]
MiddleMouseUpAction=devmgmt.msc
UpdateDivider=#UDX#
;MeasureName=mCLabel
;MeasureName2=mCFree
;MeasureName3=mCTotal
;MeasureName4=mDLabel
;MeasureName5=mDFree
;MeasureName6=mDTotal
;MeasureName7=mOSbits
ToolTipTitle=[mOSVersion] - x[mOSbits] / [mScreenSize]
ToolTipIcon=Info
ToolTipText=C:/[mCLabel] ~ [mCFree]B / [mCTotal]B#CRLF#D:/[mDLabel] ~ [mDFree]B / [mDTotal]B#CRLF#L ~ Refresh#CRLF#M ~ Device Manager
X=153
Y=8
W=20
H=20
DynamicVariables=1
The problem this time is that the Image meter doesn't support the AutoScale option, which belongs to the String meter. Unfortunately to get the values scaled, you have to add some Calc measures for all of the measures used into the ToolTipText option.
Interested? It's not easy, but definitely can be done.
User avatar
balala
Rainmeter Sage
Posts: 8617
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Hiding an image when a drive is disconnected

balala » August 13th, 2019, 7:31 pm

jsmorley wrote:
August 13th, 2019, 6:55 pm
You simply cannot manually create a .rmskin. Rainmeter will not install it.
I realised just now what sl23 did mean by creating a skin installer manually or through RM.
Yep, right, the posted skin installer definitely doesn't work:
SkinInstaller.png
You do not have the required permissions to view the files attached to this post.
User avatar
sl23
Posts: 360
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: Hiding an image when a drive is disconnected

sl23 » August 13th, 2019, 7:45 pm

Re: Manual creation of rkskin...
I created one using RM, but it included files that are NOT part of the skin package, but previous versions of the Sidebar skin. So there is good reason to need a choice of NOT adding them to the installer.

I created this file, extracted it, edited it's content, then zipped it. I'm sure I saw somewhere that .rmskin files are just zipped files.
So please could you tell me why this doesn't work?
And why there's no choice to add Resources or Addons? These things are a part of many skins and the skin code allows for this. Seems strange you can use these folders but have to change everything if you then decide to share it?!

EDIT: The resource and addon folders were only there because I added them manually! The packager did NOT add these.
Did you manage to extract the content ok? It's just a zip file with a renamed extension. I thought that's all .rmskin files were?
Live for an ideal and leave no place in the mind for anything else
- MuLab - SoundCloud -