Just use a Container meter to hide the "out of window" text, and some mouse action (e.g. scroll) to, well, scroll the text up and down to your liking by decreasing or increasing its Y coordinate, in LuaTextFile.ini or your INI file equivalent:CMDR_Evolution wrote: ↑October 30th, 2020, 6:28 pm Hello and thank you for the great tool.
I've used it to create myself a log file reader but when the lines exceed the room available in the window, they can no longer be seen.
Is there a way to make the screen show the bottom of the log, rather than the top please?
I intentionally made the container smaller in height than the text and added a visible replica of the former, so you can see what's going on. Also, added some limits on the Y value of the text (i.e. the Clamp() function in the formulas and some conditional for exception cases), so it will "stop" when it makes no sense to continue scrolling. Feel free to adapt this to your environment (e.g. change the size of the container and its visible replica, remove the limits if you deem it appropriate, or change the amount by which the text's Y changes from 20 to whatever you need).
Code: Select all
[Rainmeter] Author=Jeffrey Morley Update=1000 DynamicWindowSize=1 [MeasureLuaScript] Measure=Script ScriptFile="#CURRENTPATH#LuaTextFile.lua" FileToRead=#CURRENTPATH#Test.txt [MeterContainerVisible] Meter=Image W=300 H=160 SolidColor=0,0,0,64 [MeterContainer] Meter=Image W=300 H=160 SolidColor=0,0,0,255 MouseScrollUpAction=[!SetOption MeterDisplay Y (Clamp([MeterDisplay:Y]+20,([MeterContainer:H]<[MeterDisplay:H]?[MeterContainer:H]-[MeterDisplay:H]:0),0))][!UpdateMeter MeterDisplay][!Redraw] MouseScrollDownAction=[!SetOption MeterDisplay Y (Clamp([MeterDisplay:Y]-20,([MeterContainer:H]<[MeterDisplay:H]?[MeterContainer:H]-[MeterDisplay:H]:0),0))][!UpdateMeter MeterDisplay][!Redraw] [MeterDisplay] Container=MeterContainer Meter=String MeasureName=MeasureLuaScript W=300 FontFace=Segoe UI FontSize=11 FontColor=255,255,255,255 SolidColor=0,0,0,1 AntiAlias=1 ClipString=1
This seems to work fine without dynamic variables, but you can add a DynamicVariables=1 line to [MeterContainer] if for some reason the Y values don't seem to change as expected.