Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1597

Help: Rainmeter Skins • Re: Get skin Setting

$
0
0
Is it possible to retreive the state of a specified skin's setting?
For example, if I wanted to check if a skin's "ClickThrough" is enabled, how would I go about doing that?
How about this?
readini.png

IniMod.exe for UTF-8 encoded ini file
GitHub https://github.com/jackdp/IniMod
Download https://www.pazera-software.com/products/inimod/

Code:

IniMod 1.0 [Win 64-bit] (2021.02.02)Console application for managing INI files.Jacek Pazera, https://www.pazera-software.com/products/inimod/Usage: IniMod COMMAND FILES OPTIONSOptions are case-insensitive. Options and values in square brackets are optional.All parameters that do not start with the "-" or "/" sign are treated as file names/masks.Options and input files can be placed in any order, but -- (double dash followed by space) indicates the end of parsing options and all subsequent parameters are treated as file names/masks.COMMANDS  w,   Write   Writes a key value. IniMod w FILES -s Section -k Key -v Value  r,   Read   Reads and displays the value of a key. IniMod r FILES -s Section -k Key  rnk, RenameKey   Renames the key. IniMod rnk FILES -s Section -k OldKeyName -kn NewKeyName  rmk, RemoveKey   Removes the key. IniMod rmk FILES -s Section -k Key  rms, RemoveSection   Removes the given section. IniMod rms FILES -s Section  ras, RemoveAllSections   Removes all sections. IniMod ras FILES  rs,  ReadSection   Displays section keys and values. IniMod rs FILES -s Section  rk,  ReadKeys   Displays section keys. IniMod rk FILES -s Section  ls,  ListSections   Displays the names of all sections. IniMod ls FILES  wsc, WriteSectionComment   IniMod wsc FILES -s Section -c Comment [-x NUM]  rsc, RemoveSectionComment   IniMod rsc FILES -s Section  wfc, WriteFileComment   Adds one line to the file comment. IniMod wfc FILES -c Comment [-x NUM]  rfc, RemoveFileComment   Clears file comment. IniMod rfc FILESMAIN OPTIONS  -s,  --section=NAME        Section name.  -k,  --key=NAME            Key name.  -kn, --new-key-name=NAME   Key name.  -v,  --value=STR           Key value.  -c,  --comment=STR         Section or file comment.  -x NUM                     Padding spaces (for comments). NUM - a positive integer.  -rd, --recurse-depth=NUM   Recursion depth when searching for files. NUM - a positive integer.       --silent              Do not display some messages.INFO  -h, --help      Show this help.      --version   Show application version.      --license   Display program license.      --home      Opens program home page in the default browser.      --github    Opens the GitHub page with the program's source files.FILES - Any combination of file names/masks.        Eg.: file.ini *config*.ini "long file name.ini"-------------------------------------------------EXIT CODES  0 - OK - no errors.  2 - Syntax error.  1 - Other error.
You need to put IniMod.exe (430 KB) in the @Resources\Addons\IniMod.exe

Code:

ReadIni.UTF-16LE│  Skin.ini│  └─@Resources    └─Addons            IniMod.exe
Skin.ini

Code:

;; 2024-09-20 | UTF-16 LE BOM;;;; Read a key value from Rainmeter.ini (UTF-16 LE BOM);;[Variables];;;; Skin scaling - Based on display resolution recognized by the Rainmeter.exe;;            ;;  1.00 (100%) - 1920x1080, 1280x720;;  1.25 (125%) - 1920x1200;;  1.50 (150%) - 2560x1440, 2560x1600, 3440x1440;;  2.00 (200%) - 3840x2160;;  4.00 (400%) - 7680x4320;;;; @see  Rainmeter and DPI in Windows 10 by jsmorley | https://forum.rainmeter.net/viewtopic.php?t=22272;; @see  Get DPI scaling on the command line | `setdpi.exe value 1` | https://github.com/imniko/SetDPI;;$=(Max(1.00,Ceil(Min(#SCREENAREAWIDTH#,#SCREENAREAHEIGHT#)/1080*100/25)*25/100))INI_FILE=#SETTINGSPATH#Rainmeter.iniSECTION_NAME=illustro\ClockKEY_NAME=ClickThrough[Rainmeter]Update=-1; DefaultUpdateDivider=-1AccurateText=1MouseActionCursor=0;; =========================================================;; ===  Measures  ==========================================;; =========================================================;;;; RunCommand plugin by Brian | https://docs.rainmeter.net/manual/plugins/runcommand/;;;; > Program option | https://docs.rainmeter.net/manual/plugins/runcommand/#Program;;;; > IniMod.exe for UTF-8 encoded ini file | https://github.com/jackdp/IniMod;;;; @Note The file encoding of Rainmeter.ini is UTF-16 LE BOM (Unicode).;;       You can not write any value to the Rainmeter.ini with IniMod.exe.;;       `type "#INI_FILE#" > ini.txt` is converting from UTF-16 LE BOM to ANSI.;;       If it contains any multibyte characters in the Section name or Key name,;;       you can not read the values.;;;;;; Substitute option - Regular expressions;;;; 1. Remove lines except line 1.;;    "\n[\s\S]*":"";;;; 2. Trimming whitespace characters at the beginning of the string.;;    "\A\s+":"";;;; 3. Trimming whitespace characters at the end of the string.;;    > https://regex101.com/r/yk6az1/4;;    "\A[\s\S]*\S\K\s*\z":""    (much better than "\s+$":"");;[pRunCommand]Measure=PluginPlugin=RunCommandProgram=%ComSpec% /CParameter=type "#INI_FILE#" > ini.txt && IniMod.exe r ini.txt -s "#SECTION_NAME#" -k "#KEY_NAME#" --silentStartInFolder=#@#AddonsOutputType=ANSIDynamicVariables=1RegExpSubstitute=1; Substitute="\n[\s\S]*":"", "^The (?:SECTION|KEY) name was not specified!$":"", '^Key ".+?" does not exists!$':"", "\A\s+":"", "\A[\s\S]*\S\K\s*\z":""Substitute="\n[\s\S]*":""FinishAction=[!Log "[#SECTION_NAME#] #KEY_NAME#=[pRunCommand] | #INI_FILE#"];; =========================================================;; ===  Meters  ============================================;; =========================================================[Box]Meter=ImageW=(80*#$#)H=(80*#$#)SolidColor=EDEADELeftMouseUpAction=[!SetVariable KEY_NAME "Draggable"][!UpdateMeasure pRunCommand][!CommandMeasure pRunCommand "Run"][Ninja]Meter=StringHidden=1UpdateDivider=-1OnUpdateAction=[!CommandMeasure pRunCommand "Run"]

Statistics: Posted by nek — Today, 12:18 am



Viewing all articles
Browse latest Browse all 1597

Trending Articles