It is currently April 13th, 2021, 10:19 am

Three pages notes, my first to share here, please CnC

Quote of the Day, To-Do List and other text-based skins
User avatar
Ivan
Posts: 258
Joined: January 27th, 2012, 6:37 pm
Location: Belgrade, Serbia

Three pages notes, my first to share here, please CnC

Post by Ivan »

My first to share here, please CnC

To switch betwen notes click on colored bar.
To edit notes double click text.
You do not have the required permissions to view the files attached to this post.
Alagrian
Posts: 1
Joined: October 27th, 2016, 7:16 pm

Re: Three pages notes, my first to share here, please CnC

Post by Alagrian »

Hi nice work.

I was browsing through deviantart and found out nice solution which allows to edit notes just on your desktop (Without opening *.txt)

Code: Select all

;MeasureReadNote - Reads the written notes from txt file
;MeasureQuertyNotes - Displays editing text field
;MeasureWriteNote - Executes MeasureQuertyNote so you can start write/edit notes
;MeterNote - Shows the notes

[MeasureReadNote]
Measure=PLUGIN
Plugin=WebParser
Url=#Path_to_notes#\Note.txt
RegExp="(?s)(.*)"
StringIndex=1

[MeasureWriteNote]
Measure=SCRIPT
ScriptFile="#Script_path#\WriteNote.lua"
TextPath="#Path_to_notes#\Note.txt"

[MeasureQueryNote]
Measure=PLUGIN
Plugin=InputText
X=#X#
Y=#Y#
H=#H#
W=#W#
FontFace=#TextFont#
FontSize=#TextSize#
FontColor=#TextColor#
SolidColor=#ColorUnderText#
Command1=[!SetVariable AntiCrash "$UserInput$" DefaultValue="[MeasureReadNote]"]
Command2=[!SetOption MeasureWriteNote Contents "[MeasureQueryNote]"]
Command3=[!CommandMeasure MeasureWriteNote "WriteNote()"]
Command4=[!Refresh "#CURRENTCONFIG#"]

[MeterNote]
Meter=STRING
MeasureName=MeasureReadNote
x=#NoteAX#
y=#NoteAY#
H=#NoteAH#
W=#MNoteAW#
FontFace=#TextFont#
FontSize=#TextSize#
FontColor=#TextColor#
ClipString=1
Antialias=1
LeftMouseUpAction=[!CommandMeasure MeasureQueryNote "ExecuteBatch ALL"]
Sry, I dont know how to attach lua script file, so You will have to copy this and paste it to ".txt" and then change the name and extension to "WriteNote.lua"

Code: Select all

function WriteNote()

	local Path = SELF:GetOption('TextPath')
	local Contents = SELF:GetOption('Contents')
	local FilePath = SKIN:MakePathAbsolute(Path)
	
	local File = io.open(FilePath, 'w')
	if not File then
		return
	end
	File:write(Contents)
	File:close()

	return true

end