It is currently May 3rd, 2024, 11:32 pm

Write Key Value

Get help with creating, editing & fixing problems with skins
User avatar
Nugget
Posts: 43
Joined: November 1st, 2010, 4:10 am

Write Key Value

Post by Nugget »

How would I use it? For example, say I wanted them to click on [Box], and it would write the key value "1". Also, I want it to start another .ini file (Start-Menu Launcher 2.ini).

Here's my meter:

Code: Select all

[Box]
Meter=Image
x=5
y=5
ImageName=box.png
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: Write Key Value

Post by Chewtoy »

LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Variables MyVariable 1]

That will write the value 1 to the variable MyVariable in the Variables section.
If you want to start a different skin you are looking for something like
LeftMouseUpAction=!Execute [!RainmeterActivateConfig MyAwesomeSkins\MyAwesomeClock MyAwesomeClock.ini]
I don't think, therefore I'm not.
User avatar
santa_ryan
Posts: 397
Joined: June 22nd, 2010, 4:11 am

Re: Write Key Value

Post by santa_ryan »

!Execute
Special !bang that can be used to combine several !bangs together. The !bangs are separated with '[' and ']'-chars. You can also launch applications with this (!Execute ["C:\Windows\Notepad.exe"])
!RainmeterWriteKeyValue [Section] [Key] [Value] ("FileSpec")
Allows for permanently writing / changing any Key=Value in any Rainmeter .ini or other ini formatted file such as a .inc @Include file. "Section" is the section name such as [Rainmeter], "Key" and "Value" are the Key=Value pairs such as FontSize=15. "FileSpec" is optional. If included, it will make the change to the specified file as long as the file exists and is in the \Skins or %APPDATA%\Rainmeter paths. Thus, you can write to any skin .ini / .inc or Rainmeter.ini. For a change to a file to take effect, a refresh of the skin (or Rainmeter) is required.
!RainmeterActivateConfig [Config] [Ini-file]
Activates a new configuration ini-file. The ini-file is just the name of the file; do not include the path.
An Example using !Execute and !RainmeterWriteKeyValue:

Code: Select all

[Box]
Meter=Image
x=5
y=5
ImageName=box.png
MiddleMouseUpAction=!Execute [!RainmeterWriteKeyValue Box X 10][!RainmeterRefresh #CURRENTCONFIG#]
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Box X 5][!RainmeterRefresh #CURRENTCONFIG#]
An Example using !RainmeterActivateConfig:

Code: Select all

[Box]
Meter=Image
x=5
y=5
ImageName=box.png
LeftMouseUpAction=!RainmeterActivateConfig "Enigma" "Welcome.ini"
I have three rules when I'm trying to help you.
  • Don't get mad when you don't understand something
  • Be VERY specific with what you ask for.
    The more specific you are, the higher the quality of support you receive.
  • Do not just copy and paste what I put in examples and come back saying it doesn't work.
    It does work, but I purposely left blanks that you need to fill for your specific needs.
User avatar
Nugget
Posts: 43
Joined: November 1st, 2010, 4:10 am

Re: Write Key Value

Post by Nugget »

santa_ryan wrote:!Execute
Special !bang that can be used to combine several !bangs together. The !bangs are separated with '[' and ']'-chars. You can also launch applications with this (!Execute ["C:\Windows\Notepad.exe"])
!RainmeterWriteKeyValue [Section] [Key] [Value] ("FileSpec")
Allows for permanently writing / changing any Key=Value in any Rainmeter .ini or other ini formatted file such as a .inc @Include file. "Section" is the section name such as [Rainmeter], "Key" and "Value" are the Key=Value pairs such as FontSize=15. "FileSpec" is optional. If included, it will make the change to the specified file as long as the file exists and is in the \Skins or %APPDATA%\Rainmeter paths. Thus, you can write to any skin .ini / .inc or Rainmeter.ini. For a change to a file to take effect, a refresh of the skin (or Rainmeter) is required.
!RainmeterActivateConfig [Config] [Ini-file]
Activates a new configuration ini-file. The ini-file is just the name of the file; do not include the path.
An Example using !Execute and !RainmeterWriteKeyValue:

Code: Select all

[Box]
Meter=Image
x=5
y=5
ImageName=box.png
MiddleMouseUpAction=!Execute [!RainmeterWriteKeyValue Box X 10][!RainmeterRefresh #CURRENTCONFIG#]
LeftMouseUpAction=!Execute [!RainmeterWriteKeyValue Box X 5][!RainmeterRefresh #CURRENTCONFIG#]
An Example using !RainmeterActivateConfig:

Code: Select all

[Box]
Meter=Image
x=5
y=5
ImageName=box.png
LeftMouseUpAction=!RainmeterActivateConfig "Enigma" "Welcome.ini"
Thank you very, very much :)