It is currently April 27th, 2024, 8:51 pm

Mish-Mash Write contents of a measure to TXT file [solved]

Get help with creating, editing & fixing problems with skins
User avatar
Yincognito
Rainmeter Sage
Posts: 7178
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Mish-Mash Write contents of a measure to TXT file

Post by Yincognito »

CodeCode wrote: December 26th, 2023, 12:12 pm I am just using RunCommand to start a new log file that overwrites the old one, like you say; the need will likely arise eventually, So I built in a create new log on LeftMouseUpAction on a different meter. I had something already that was pretty straight forward, just changed it to suit my current need.
The File is created with the first default line of [Variables]. It seemed logical to do that so the !WriteKeyValue would see the log entries as variables and not just text, also since the idea was that the !WriteKeyValue bang will only work on an ini or inc file.
There is also a place to click and open the log ini. I am not worried that the ini would pose a problem since every text editor in the world can open an ini. :p
Sure thing, I do almost the same, with the file being basically a [Variables] .inc one. For obvious reasons, I don't prefer my visited links "log" to be necessarily opened by the user as it already recycles itself automatically, but added a short description just in case.

Code: Select all

; Stores the links of up to 100 x 100 (adjustable value) visited items, in order to set the Feeds skin's title color based on the item's read status.
; VisitedLinkIndex (initially 0) is the index of the last written visited link, and by endlessly looping between 1 and (100 x 100) recycles the file. 
; To temporarily delete this list and start over, set VisitedLinkIndex to 0 in the first row after [Variables] then remove everything below that row. 

[Variables]
VisitedLinkIndex=1
VisitedLink1=https://www.90min.com/posts/carlo-ancelotti-hails-irreplaceable-real-madrid-veteran-granada-victory?utm_source=RSS
I do however offer the ability to open the file and edit it on click, for the .txt file where I store my launcher skin's menu items.

Code: Select all

; This file stores the menu shown in the <Launcher> skin. Line indentation level (defined using either spaces or tabs) describes the menu item level,
; while more than one space or tab separate a non submenu item name from its associated command or URL. Each menu item must start on a separate line.
; URLs, paths containing spaces and command parameters within the items' associated commands must be enclosed between quotes (") to run successfully.

Utilities
	Calculator				"calc.exe"
	Registry Editor				"regedit.exe"
	Command Prompt				"cmd.exe"
	PowerShell				"powershell.exe"
Programs
	Google Chrome				"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
	Adobe Photoshop				"C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Photoshop.exe"
	Microsoft Office
		Microsoft Word			"C:\Program Files\Microsoft Office\Office16\WINWORD.EXE"
		Microsoft Excel			"C:\Program Files\Microsoft Office\Office16\EXCEL.EXE"
		Microsoft PowerPoint		"C:\Program Files\Microsoft Office\Office16\POWERPNT.EXE"
		Microsoft Access		"C:\Program Files\Microsoft Office\Office16\MSACCESS.EXE"
Games
	Backgammon				"D:\Software\Games\Backgammon Professional\BackGammon.exe"
	Monopoly				"D:\Software\Games\Monopoly by Parker Brothers\MonopolyPB.exe"
	Fifa 09					"D:\Software\Games\Fifa 09\Fifa09.exe"
	Civilization 4 BTS			"D:\Software\Games\Civilization 4\Beyond the Sword\Civ4BeyondSword.exe" mod="K-Mod"
I don't need to use RunCommand for any of that though, just plain !WriteKeyValue bangs for my feeds, and external editing on a click - like you do - for my launcher data.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth