Einder Novice
Joined: 03 Jan 2008 Posts: 48
|
Posted: Fri Dec 30, 2011 5:11 am
ToDo List/Notepad |
This script was created to be used as a todo list/notepad for Zmud. It has been fully tested and works perfectly in Zmud 7.21.
addnote <text>: adds your note
delnote #: deletes the note
complete #: marks the note as complete
prioritize #: colors the note red to mark it as a priority
todo: displays all notes
everything else runs in the background. Enjoy!
Code: |
#CLASS {Notepad}
#ALIAS addnote {
#ADDKEY Notepad %eval( %numkeys( @Notepad)+1) {%-1}
#ECHO Note added.
}
#ALIAS ToDo {
#SHOW "#"":" Notes Text
#LOOPDB @Notepad {#SHOW %key":" %val}
}
#ALIAS sortnotes {
#VAR temp ""
#LOOPDB @Notepad {#ADDITEM temp {%concat( %key, "=", %val)}}
#VAR temp %sort( @temp)
#VAR Notepad ""
#LOOP %numitems( @Temp) {#ADDKEY Notepad %i %word( %pop( Temp), 2, "=")}
#UNVAR temp
#GAG
}
#ALIAS delnote {
#LOOPDB @Notepad {
#IF (%key = %1) {
#ECHO Note Removed.
#DELKEY Notepad %key
}
}
sortnotes
}
#ALIAS complete {
#LOOPDB @Notepad {
#IF (%key = %1) {
#DELKEY Notepad %key
#ADDKEY Notepad %key {%ansi( cyan)*Completed* %ansi( grey)%val}
#ECHO Note Completed.
}
}
sortnotes
}
#ALIAS prioritize {
#LOOPDB @Notepad {
#IF (%key = %1) {
#DELKEY Notepad %key
#ADDKEY Notepad %key %ansi( red)%val
#ECHO Note Prioritized.
}
}
sortnotes
}
#VAR notepad {}
#CLASS 0 |
|
|