It is currently April 26th, 2024, 6:52 pm

How to copy text inside skin.

Get help with creating, editing & fixing problems with skins
infanity
Posts: 5
Joined: October 17th, 2014, 1:08 am

How to copy text inside skin.

Post by infanity »

I want to make popup windows that have text inside them I can copy when needed. Like having a list of aliases for text editors or what not. So how can I make text inside a skin able to be copied to a clipboard?
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: How to copy text inside skin.

Post by Mordasius »

Is the text going to change very often and/or will the same text always be in the same popup window?

If so, then you may not need to copy the text to the clipboard you can just have something like a !LeftMouseUpAction bang do whatever it is you want to do with the text.
infanity
Posts: 5
Joined: October 17th, 2014, 1:08 am

Re: How to copy text inside skin.

Post by infanity »

I'm taking about a list of shortcuts I wanna copy and paste from a rainmeter window to use in editors. Yeah I may update the list but how exactly can I click on a line of text and copy it so I can paste it in another program?
User avatar
Mordasius
Posts: 1173
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: How to copy text inside skin.

Post by Mordasius »

Sounds like you need to use the !SetClip bang. Here is an example:

Code: Select all

[Rainmeter]
DynamicWindowSize=1
AccurateText=1

[Variables]
Post2ClipBoard="This text comes from the meter"

[StringMeter-1]
Meter=String
FontColor=ffffff
SolidColor=00000001
Text=#Post2ClipBoard#
LeftmouseUpAction=[!SetClip "#Post2ClipBoard#"]
DynamicVariables=1
Adding DynamicVariables=1 to [StringMeter-1] allows you to change the text stored as the variable #Post2ClipBoard# using the !SetVariable bang.