Here is an example of how to detect the horizontal resolution (screen width), and swap between two configs accordingly. I have attached all files to this post. Basically, there is a "main" config that doesn't actually contain any visible meters - its only purpose is to activate and deactivate the other two configs, each of which is located in its own subdirectory. To avoid a warning when choosing the main config, I put a hidden meter in it.
The directory structure of this example is:
Outer directory, goes in Skins directory: Swapconfig\
Main config file that should be selected in Rainmeter: Swapconfig\Swapconfig.ini
One of the two configs to swap between: Swapconfig\Config1\Config1.ini
The other config to swap between: Swapconfig\Config2\Config2.ini
The code for the main config (the one that controls the swapping is:
Code: Select all
[Rainmeter]
Author=kati42
Update=500
;----------------------------------
; Screen Resolution Control
;----------------------------------
[MeasureScreenWidth]
Measure=Plugin
Plugin=Plugins\SysInfo.dll
SysInfoType=SCREEN_WIDTH
SysInfoData=1
IfEqualValue=1280
IfEqualAction=!Execute [!RainmeterActivateConfig Swapconfig\Config1 Config1.ini] [!RainmeterDeactivateConfig Swapconfig\Config2 Config2.ini]
IfBelowValue=1280
IfBelowAction=!Execute [!RainmeterActivateConfig Swapconfig\Config2 Config2.ini] [!RainmeterDeactivateConfig Swapconfig\Config1 Config1.ini]
[Meter]
Meter=IMAGE
X=0
Y=0
W=16
H=16
SolidColor="0,0,0,255"
Hidden=1
When the updated DesktopCoral (an application to reserve space at the sides of the desktop) is posted that lets you send command-line options to set its location and size, I'll post another example that uses that in conjunction with swapping Rainmeter configs...