Yeah I was not sure what was going on in the skin so I just reduced the amount of 'logic' :dYincognito wrote: ↑February 10th, 2022, 1:20 pm Sorry for the delay, I was busy with some other stuff as well. This should do what I think you wanted in the above code:I don't think this solves your original problem though. First, what you do in the above code is write things to the SAME file. Sure, this can be changed to write to some other existing INI/INC file, but it won't be "multiline" the way you think, since each line would basically be an option that can be overwritten, and that ends as soon as the newline character is encountered...Code: Select all
[Rainmeter] Update=1000 AccurateText=1 DynamicWindowSize=1 [Variables] CurrentInput="Blank File" Store=iiiiiiiiiiiiii [MeterButton] Meter=String FontSize=12 FontColor=255,156,0 SolidColor=100,100,100,0 StringStyle=Bold Padding=5,5,5,5 AntiAlias=1 Text=X LeftMouseUpAction=[!CommandMeasure MeasureInput "ExecuteBatch 1"] [MeterInputLabel] Meter=String X=25 Y=0r W=170 FontSize=12 FontColor=255,156,0 SolidColor=100,100,100,50 Padding=5,6,5,4 StringStyle=Italic AntiAlias=1 DynamicVariables=1 Text=#CurrentInput# [MeterPerma] Meter=String X=210 Y=0r W=170 ;H=18 FontSize=12 FontColor=255,156,0 SolidColor=100,100,100,50 Padding=5,6,5,4 StringStyle=Italic AntiAlias=1 DynamicVariables=1 Text=#Store# [MeasureInput] Measure=Plugin Plugin=InputText X=27 Y=4 W=171 H=20 FontSize=12 FontColor=255,255,255,255 SolidColor=47,47,47,255 AntiAlias=1 FocusDismiss=1 DefaultValue=#CurrentInput# Command1=[!SetVariable CurrentInput "$UserInput$"][!SetVariable Store "[MeasureInput]"][!WriteKeyValue Variables Store "[MeasureInput]"][!UpdateMeter *][!Redraw] DynamicVariables=1
EDIT: ActiveColors beat me to it, but there are some differences between the codes.
It is currently October 14th, 2024, 10:36 am
Text editor skin?
-
- Moderator
- Posts: 1318
- Joined: February 16th, 2012, 3:32 am
- Location: Berlin, Germany
Re: Text editor skin?
-
- Posts: 81
- Joined: October 25th, 2019, 1:20 am
Re: Text editor skin?
I intended to have that text editor kind of thing, but I didn't imagine how the !WriteKeyValue bang worked correctly and didnt get the intended effect. Right now I'm looking into how to use lua script in rainmeter for the read/write lua library
-
- Moderator
- Posts: 1318
- Joined: February 16th, 2012, 3:32 am
- Location: Berlin, Germany
Re: Text editor skin?
Yincognito,
I have just come up with an idea that it might be possible to create a multi-line text editor skin but there are some issues and I don't know if they can be fixed. See the gif below with the issues in-action:
I have just come up with an idea that it might be possible to create a multi-line text editor skin but there are some issues and I don't know if they can be fixed. See the gif below with the issues in-action:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 81
- Joined: October 25th, 2019, 1:20 am
Re: Text editor skin?
Lol I'm struggling to even get the code to read a text file.Active Colors wrote: ↑February 10th, 2022, 2:27 pm Yincognito,
I have just come up with an idea that it might be possible to create a multi-line text editor skin but there are some issues and I don't know if they can be fixed. See the gif below with the issues in-action:
GIF.gif
Code: Select all
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
[MeasureScript]
Measure=Script
ScriptFile=ReadFile.lua
;Disabled=1
[MeterReadOut]
Meter=String
X=25
Y=0
W=170
FontSize=12
FontColor=255,156,0
SolidColor=100,100,100,50
Padding=5,6,5,4
StringStyle=Italic
AntiAlias=1
DynamicVariables=1
Text=[&MeasureScript:ReadFile('data.txt')]
-
- Moderator
- Posts: 1318
- Joined: February 16th, 2012, 3:32 am
- Location: Berlin, Germany
Re: Text editor skin?
I was about to post my test code but you were faster than me because I was cleaning up my test code.ItsJustRyan wrote: ↑February 10th, 2022, 2:36 pm Lol I'm struggling to even get the code to read a text file.
Forgive the formatting it was taken from my previous attempt. Currently data.txt is just a text file with random filler text, and the ReadFile.lua is taken from Rainmeter's read-write file documentation.Code: Select all
[Rainmeter] Update=1000 AccurateText=1 DynamicWindowSize=1 [Variables] [MeasureScript] Measure=Script ScriptFile=ReadFile.lua ;Disabled=1 [MeterReadOut] Meter=String X=25 Y=0 W=170 FontSize=12 FontColor=255,156,0 SolidColor=100,100,100,50 Padding=5,6,5,4 StringStyle=Italic AntiAlias=1 DynamicVariables=1 Text=[&MeasureScript:ReadFile('data.txt')]
Lua could be the approach but due to my lack of experience with lua I use Quote plugin to read a text file. https://docs.rainmeter.net/manual/plugins/quote/
This is how it is done with Quote plugin:
Code: Select all
[MeasureNotes]
Measure=Plugin
Plugin=QuotePlugin
PathName=#@#Note.txt
Separator=¶
[MeterNotes]
Meter=String
MeasureName=MeasureNotes
Text=%1
-
- Developer
- Posts: 22854
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Text editor skin?
Plugin=QuotePlugin
-
- Moderator
- Posts: 1318
- Joined: February 16th, 2012, 3:32 am
- Location: Berlin, Germany
Re: Text editor skin?
Was also about to point about that it could be good to add another option to use simply "Quote" because the "Plugin" part looks rudimentary.
Also, on the sidebar of the documentation and in the title of the page it says "Quote plugin" while it had to be "QuotePlugin plugin".
EDIT: I fixed the mistake in my reply above.
-
- Developer
- Posts: 22854
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Text editor skin?
Yeah, let us chew on this a bit. I also hate the redundancy of QuotePlugin.Active Colors wrote: ↑February 10th, 2022, 2:53 pm Was also about to point about that it could be good to add another option to use simply "Quote" because the "Plugin" part looks rudimentary.
Also, on the sidebar of the documentation and in the title of the page it says "Quote plugin" while it had to be "QuotePlugin plugin".
-
- Posts: 81
- Joined: October 25th, 2019, 1:20 am
Re: Text editor skin?
Code: Select all
[MeasureNotes]
[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
[Variables]
[MeasureNotes]
Measure=Plugin
Plugin=QuotePlugin
PathName=#@#data/data.txt
;Separator=¶
[MeterNotes]
Meter=String
MeasureName=MeasureNotes
X=25
Y=0
W=170
FontSize=12
FontColor=255,156,0
SolidColor=100,100,100,50
Padding=5,6,5,4
StringStyle=Italic
AntiAlias=1
DynamicVariables=1
Text=%1
-
- Moderator
- Posts: 1318
- Joined: February 16th, 2012, 3:32 am
- Location: Berlin, Germany
Re: Text editor skin?
Are you sure your data.txt file is in /@Resources/data/ directory?ItsJustRyan wrote: ↑February 10th, 2022, 3:00 pmIt does not appear to want to work :/Code: Select all
[MeasureNotes] [Rainmeter] Update=1000 AccurateText=1 DynamicWindowSize=1 [Variables] [MeasureNotes] Measure=Plugin Plugin=QuotePlugin PathName=#@#data/data.txt ;Separator=¶ [MeterNotes] Meter=String MeasureName=MeasureNotes X=25 Y=0 W=170 FontSize=12 FontColor=255,156,0 SolidColor=100,100,100,50 Padding=5,6,5,4 StringStyle=Italic AntiAlias=1 DynamicVariables=1 Text=%1
Also, you commented out Separator=¶ with semi-column. You need to remove the semi-column in order to properly display line-breaks.