tip: look for things that follow a certain nomenclature - eg
$PREF::NOTEBOOK::KEYBIND
or something
then find-replace NOMENCLATURE with Bluzone Journal
eg "NOTEBOOK" with "Bluzone Journal"
Lugnut, in the
client for NoteBook, there are numerous entries stating where it's saves entries. If I modify those, will it save to another file?
Also, where would I find the preferences you're taling about for the keybind?
exec("./NoteBook.GUI");
exec("./NoteBook_View.gui");
$remapDivision[$remapCount] = "NoteBook";
$remapName[$remapCount] = "Open";
$remapCmd[$remapCount] = "OpenNoteBook";
$remapCount++;
function OpenNoteBook(%val)
{
if(%val){
if(NoteBook.isAwake()){
BuildNoteBook_List();
canvas.popdialog(NoteBook);
}else{
BuildNoteBook_List();
canvas.pushdialog(NoteBook);
}
}
}
function SaveStuff(%file)
{
%text = NoteBook_Paper.getvalue();
%title = NoteBook_Name.getvalue();
%subject= NoteBook_Subject.getValue();
if(%text $= "" || %title $= "" || %subject $= "")
{
MessageBoxOK("ERROR", "Please include Name, Subject, and some text.");
return;
}
else
{
if(isFile("config/client/Saves/" @ %title @ ".txt"))
fileDelete("config/client/Saves/" @ %title @ ".txt");
%file = new FileObject();
%file.openForwrite("config/client/Saves/" @ %title @ ".txt");
%file.writeLine(%title);
%file.writeLine(%subject);
%file.writeLine(%text); //IMO it's easier to put each one on another line, so we can just read them out where we want them. Only the last input can be multi-line anyway, so we don't need a special delimiter.
%file.close();
%file.delete();
discoverFile("config/client/Saves/" @ %title @ ".txt");
BuildNoteBook_List();
}
}
//my usual
function NoteBook_List::onSelect(%this,%id,%text)
{
%file = "config/client/Saves/" @ %text @ ".txt";
if(isFile(%file))
{
%fo = new FileObject();
%fo.openForRead(%file);
%title = %fo.readLine();
NotebookViewer_Title.setText(%title);
%subject = %fo.readLine();
NotebookViewer_Subject.setText(%subject);
canvas.pushDialog(NoteBook_View);
if(%fo.isEoF())
NoteBookViewer_Paper.setText("This file appears to be blank or corrupted. Sorry!");
else while(!%fo.isEOF())
{
%line = %fo.readLine();
%stuff = %stuff NL %line;
}
NoteBookViewer_Paper.setText(%stuff);
$CurrentNote = "config/client/Saves/" @ %text @ ".txt";
}
else
{
echo("cannot find file: " @ %stuff);
}
}
function BuildNoteBook_List() //this should be called every time we refresh the GUI, e.g. when we push it to canvas.
{
NoteBook_List.clear();
%path = "config/client/Saves/"; //change only this if you ever need to.
%filesearch = FindFirstFile(%path @ "*.txt");
%i = 0;
while (strlen(%filesearch) > 0)
{
NoteBook_List.addrow(%i, getsubstr(%filesearch, strlen(%path), strlen(%filesearch)-strlen(%path)-4), %i);
%filesearch = FindNextFile(%path @ "*.txt");
}
}
function NoteDelete()
{
canvas.popDialog(Notebook_View);
fileDelete($CurrentNote);
BuildNotebook_List();
}
function NoteModify()
{
%title = NotebookViewer_Title.getValue();
%subject = NotebookViewer_Subject.getValue();
%paper = NotebookViewer_Paper.getValue();
canvas.popDialog(Notebook_View);
Notebook_Name.setValue(%title);
Notebook_Subject.setValue(%subject);
Notebook_Paper.setValue(%paper);
}
What state!?!
TELL ME!
I meant what state do you live in.