It is currently March 29th, 2024, 8:02 am

Send data to clipboard

Get help with creating, editing & fixing problems with skins
kenny782
Posts: 6
Joined: June 1st, 2010, 9:44 pm

Send data to clipboard

Post by kenny782 »

I just started with this app the last few weeks ago.
I found alot of cool config's and managed to modify a few of them.
One of them shows me some IP information.

What I'm hoping to do is send some of these IP's to my clipboard.
For example if I click on the LAN IP the LAN address is sent to my clipboard.
And the same for WAN IP etc..

Is this at all possible or am I wasting my time?
If anyone has some links to examples I'd appreciate it.

Thanks,

Kenny
P2C
Posts: 45
Joined: November 13th, 2009, 10:22 pm
Location: near Würzburg, Germany

Re: Send data to clipboard

Post by P2C »

Well, you should be able to do this with a little extra tool called NirCmd.

Looking at its official page there's a way to do this.

Now, actually as code it should be something like this:

Code: Select all

[MeasureIPAdress]
;the section that measures the IP-Adress

[...]

[Button]
Meter=IMAGE
ImageName=Button.png
LeftMouseDownAction=!Execute ["#ADDONSPATH#\Nircmd\Nircmd.exe" clipboard set [MeasureIPAdress]] 
Please note that "MeasureIPAdress" is just some random name and the actual section probably is called different.

Also important:
-Download nircmd.exe (from link above)
-Create a new folder in Rainmeter's add-ons directory called "Nircmd" (most likely its C:\Programs\Rainmeter\Addons\"
-Copy nircmd.exe into this folder
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Send data to clipboard

Post by jsmorley »

Or you can use this little skin as an example/starting point, which uses a tiny addon I just wrote in AutoIt3. Source is included.

You will need to get and install the latest Release Candidate of Rainmeter 1.2 from http://Rainmeter.net

Once you are running Rainmeter 1.2 RC1, just run this rmskin right from here or download it and double click to run:
ClipPut.rmskin
The skin looks like this:

Code: Select all

;=================================================
; Rainmeter configuration file
; Updated June 1, 2010
;=================================================

;[BEGIN CONFIG FILE]==============================

[Rainmeter]
Author=Jeffrey Morley
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,190
Update=1000

;Metadata added by RainBrowser
;http://rainmeter.net/cms/Rainmeter101-EditingSkins

[Metadata]
Name=ClipPut
Config=ClipPut
Description=Demonstrates using the addon TxtToClip.exe to put text in the Windows Clipboard
Instructions=
Version=June 1, 2010
Tags=Addons
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=0
Preview=

;End of added Metadata

[Variables]
FontFace=Segoe UI
FontSize=13
FontColor=244,216,162,255
AntiAlias=1

[MeasureIPWeb]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=http://www.geobytes.com/IpLocator.htm?GetLocation
RegExp="(?siU)name="ipaddress" size="15" value="(.*)">"
StringIndex=1
UpdateRate=30000

[MeterIPWeb]
Meter=String
MeasureName=MeasureIPWeb
SolidColor=0,0,0,1
FontFace=#FontFace#
FontSize=#FontSize#
FontColor=#FontColor#
AntiAlias=#AntiAlias#
LeftMouseUpAction=!Execute ["#ADDONSPATH#\TxtToClip\TxtToClip.exe" "[MeasureIPWeb]"]

P.S. If you really don't want to install the RC of Rainmeter 1.2, the .rmskin is just a renamed .zip file and has everything in it you need to install the pieces manually.
You do not have the required permissions to view the files attached to this post.
kenny782
Posts: 6
Joined: June 1st, 2010, 9:44 pm

Re: Send data to clipboard

Post by kenny782 »

cool thanks guys! I'll play with it tomorrow :)