LTCD_060719.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:45:17 +02:00
commit f86e69648b
156 files changed
+49537

No files matched your search

+114
View File
@@ -0,0 +1,114 @@
while (!initial_user_tasks_startup_complete)
SwapInNext;
void ASCIIKeys(I1 *st)
{
U8 ch;
I1 buf[80];
do {
ch=GetKey;
if (ch==*st) {
PutChar(ch);
st++;
} else {
if (*st==CH_CR)
SPrintF(buf,"Press the '$$FG GREEN$$ENTER$$FG$$' key");
else
SPrintF(buf,"Press the '$$FG GREEN$$%c$$FG$$' key",*st);
PopUpOk(buf);
}
} while (*st);
}
void SlowASCIIAutoType(I1 *st)
{
U8 ch;
do {
if (ch=*st++) {
PutChar(ch);
Sleep(100);
}
} while (ch);
}
void SpecialKey(U8 scancode,I1 *name)
{
U8 sc,ch;
I1 buf[80];
do {
ch=GetChar2(&sc);
if (sc&0xFF!=SC_PRTSCRN1) {
if (sc&0xFF!=scancode&0xFF) {
SPrintF(buf,"Press the '$$FG GREEN$$%s$$FG$$' key",name);
PopUpOk(buf);
}
}
} while (sc&0xFF!=scancode&0xFF);
Msg(MSG_KEY_DOWN,ch,sc);
}
void SpecialASCIIKey(U8 ch1,I1 *name,U8 flag_mask=0,U8 flags=0)
{
U8 sc,ch;
I1 buf[80];
do {
ch=GetChar2(&sc);
if (ch && ch!=ch1) {
SPrintF(buf,"Press the '$$FG GREEN$$%s$$FG$$' key",name);
PopUpOk(buf);
}
} while (ch!=ch1 || (sc&flag_mask!=flags));
Msg(MSG_KEY_DOWN,ch,sc);
}
void UntilSpecialKey(U8 scancode)
{
U8 sc,ch;
do {
ch=GetChar2(&sc);
Msg(MSG_KEY_DOWN,ch,sc);
} while (sc&0xFF!=scancode&0xFF);
}
void UntilASCIIKey(U8 ch1)
{
U8 sc,ch;
do {
ch=GetChar2(&sc);
Msg(MSG_KEY_DOWN,ch,sc);
} while (ch!=ch1);
}
public I8 PopUpTourPart()
{
I8 i;
Ltf *l=LtfNew;
LtfPutS(l,"$$FG PURPLE$$LoseThos Tours$$FG$$\r\n\r\n");
LtfPutS(l,"$$CM +LX, 4,4$$$$BT, \"Part 1: The basics\",1$$");
LtfPutS(l,"$$CM +LX, 4,4$$$$BT, \"Part 2: Editing and running programs\",2$$");
LtfPutS(l,"$$CM +LX, 4,4$$$$BT, \"Part 3: Adding macros to your start menu\",3$$");
LtfPutS(l,"$$CM +LX, 4,4$$$$BT, \"Part 4: WordStat\",4$$");
LtfPutS(l,"$$CM +LX, 4,4$$$$BT, \"Done\",-1$$");
i=PopUpMenu(l);
LtfDel(l);
return i;
}
I8 i;
do {
switch (i=PopUpTourPart)
{
case 1:
ExecuteFile("::/LT/ACCOUNTS/TOUR/TOUR1.AUZ");
break;
case 2:
ExecuteFile("::/LT/ACCOUNTS/TOUR/TOUR2.AUZ");
break;
case 3:
ExecuteFile("::/LT/ACCOUNTS/TOUR/TOUR3.AUZ");
break;
case 4:
ExecuteFile("::/LT/ACCOUNTS/TOUR/TOUR4.AUZ");
break;
}
} while (i>=1);
+101
View File
@@ -0,0 +1,101 @@
//This puts the cursor at the bottom
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN|SCF_CTRL);
PutS("\r");
PopUpOk(
"After clicking 'OKAY', you will be at the\r\n"
"command line.\r\n\r\n"
"Type \"$$FG GREEN$$Dir;$$FG$$\" and press $$FG GREEN$$ENTER$$FG$$.\r\n\r\n"
"You must remember the semicolon.\r\n"
);
ASCIIKeys("Dir;\r");
Sleep(1000); //allow user time to see dir
PutChar(CH_CR);
PopUpOk(
"After clicking 'OKAY', you will be at the\r\n"
"command line.\r\n\r\n"
"Press the $$FG GREEN$$WINDOW$$FG$$s key.\r\n\r\n"
"This will access your macro/menu/help area.\r\n"
"You can customize it. It's like your\r\n"
"START menu.\r\n");
SpecialKey(SC_GUI,"WINDOWS KEY");
Sleep(1000);
PopUpOk(
"For future reference, you can get to the\r\n"
"menu/macro/help area by clicking the left\r\n"
"mouse button when the mouse cursor is on\r\n"
"the word \"MENU\" in the upper-left border\r\n"
"of the window.\r\n");
PopUpOk(
"After clicking 'OKAY', you will be back at\r\n"
"the menu/macro/help area.\r\n\r\n"
"Press $$FG GREEN$$CURSOR-DOWN$$FG$$ five times.\r\n");
//This puts the cursor at the top
Msg(MSG_KEY_DOWN,0,SC_CURSOR_UP|SCF_CTRL);
I8 i;
for (i=0;i<5;i++)
SpecialKey(SC_CURSOR_DOWN,"CURSOR-DOWN");
PopUpOk(
"After clicking 'OKAY', the cursor will be\r\n"
"on top of a macro we wish to run. Usually,\r\n"
"underlined text will do something.\r\n\r\n"
"Macros are normally $$FG LTBLUE$$BLUE$$FG$$ and you run\r\n"
"them by left-clicking the mouse. You can\r\n"
"simulate a left-mouse with a $$FG GREEN$$SPACE$$FG$$\r\n"
"key.\r\n\r\n"
"After clicking OKAY, press $$FG GREEN$$SPACE$$FG$$.\r\n");
ASCIIKeys(" ");
Sleep(1000);
PopUpOk(
"The macro changed directories and did\r\n"
"a $$FG GREEN$$Dir;$$FG$$ command.\r\n\r\n"
"The $$FG RED$$RED$$FG$$ filenames listed are file\r\n"
"links. Left-clicking will edit/view them.\r\n"
"Right-clicking or pressing $$FG GREEN$$ENTER$$FG$$\r\n"
"when the cursor is on top will bring-up a\r\n"
"menu of options.\r\n\r\n"
"The $$FG LTBLUE$$BLUE$$FG$$ underline entries \"$$FG LTBLUE$$.$$FG$$\" and \"$$FG LTBLUE$$..$$FG$$\"\r\n"
"are macros and will change directories.\r\n");
PopUpOk(
"As you can see, the command line is not\r\n"
"different from the help/menu/macro area.\r\n"
"Both use the same commands and have the same\r\n"
"'Widgets' available.\r\n\r\n"
"Both utilize the same underlying document format\r\n"
"known as LoseThos rich text. It is similar to\r\n"
"html because it has ASCII behind it.\r\n\r\n"
"Press \"$$FG GREEN$$CTRL-T$$FG$$\" after clicking 'OKAY' to toggle\r\n"
"to plain text mode.\r\n");
SpecialASCIIKey(20,"CTRL-T");
Sleep(1000);
PopUpOk(
"The widgets are bracketed with dollar sign\r\n"
"characters. \"LK\" stands \"link\" and \"MA\"\r\n"
"stands for \"macro\".\r\n\r\n"
"Now, press \"$$FG GREEN$$CTRL-T$$FG$$\" to toggle back to\r\n"
"regular mode.\r");
SpecialASCIIKey(20,"CTRL-T");
Sleep(1000);
PopUpOk(
"In summary, you left-click on underlined\r\n"
"text or press $$FG GREEN$$SPACE$$FG$$ when the cursor\r\n"
"is on top, to perform the primary action.\r\n"
"You right-click or press $$FG GREEN$$ENTER$$FG$$\r\n"
"to perform a secondary action.\r\n\r\n"
"The $$FG GREEN$$WINDOW$$FG$$'s key will bring-up the help/macro/menus\r\n"
"as will clicking on the word \"MENU\" in the\r\n"
"upper-left corner of a window's border.\r\n\r\n"
"The $$FG GREEN$$CTRL-T$$FG$$ key will toggle plain-text mode.\r\n");
+76
View File
@@ -0,0 +1,76 @@
//This puts the cursor at the bottom
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN|SCF_CTRL);
PutS("\r");
PopUpOk(
"Now, we're going to demonstrate how to work\r\n"
"with programs. We'll change to the \LT\DEMO\r\n"
"directory. The change directory command\r\n"
"will be typed for you and you just need\r\n"
"to press $$FG GREEN$$ENTER$$FG$$.\r\n\r\n"
"Note, that directories are specified with\r\n"
"a forward slash, not a backslash.\r\n"
"Drives can be specified in a $$FG GREEN$$Cd()$$FG$$ command\r\n"
"and the boot drive is specified with \"$$FG GREEN$$::$$FG$$\".");
PutS("Cd(\"::/LT/DEMO\");Dir;");
ASCIIKeys("\r");
PopUpOk(
"Now, we're going to edit a file. Normally,\r\n"
"you'll probably left-click on a directory\r\n"
"listing to edit a file, but we're going to\r\n"
"type it on the command line.\r\n\r\n"
"Press $$FG GREEN$$ENTER$$FG$$ to complete the command.\r\n");
PutS("Edit(\"Sound.CPZ\");");
ASCIIKeys("\r");
Sleep(1000);
PopUpOk(
"This program gets keys and plays frequencies.\r\n"
"It quits when you press $$FG GREEN$$ESC$$FG$$.\r\n\r\n"
"There is no \"$$FG GREEN$$main()$$FG$$\" function in LoseThos\r\n"
"programs. Any program statements outside\r\n"
"functions get executed when you $$FG GREEN$$#include$$FG$$\r\n"
"them at the command line.\r\n\r\n"
"The \"$$FG GREEN$$Organ;$$FG$$\" statement at the bottom\r\n"
"will run the program when we $$FG GREEN$$#include$$FG$$ it.\r\n");
PopUpOk(
"The editor and most things exit when you press\r\n"
"$$FG GREEN$$ESC$$FG$$. $$FG GREEN$$CTRL-Q$$FG$$ will abort (cancel) most things.\r\n\r\n"
"The $$FG GREEN$$ESC$$FG$$ key can be simulated with a left\r\n"
"double-click, while the $$FG GREEN$$CTRL-Q$$FG$$ key can be\r\n"
"simulated with a right double-click. When\r\n"
"you browse documentation, you'll left-click\r\n"
"on links and right double-click to go back,\r\n"
"unless you want to save changes to documents\r\n"
"using left double-click.\r\n\r\n"
"Press $$FG GREEN$$CTRL-Q$$FG$$ to quit out of the editor.\r\n"
);
SpecialASCIIKey(CH_CTRLQ,"CTRL-Q");
PopUpOk(
"Now, we'll run the Sound.CPZ program.\r\n"
"Press $$FG GREEN$$ENTER$$FG$$ at the command line to\r\n"
"$$FG GREEN$$#include$$FG$$ it. Then press keys to\r\n"
"cause sounds and press $$FG GREEN$$ESC$$FG$$ when\r\n"
"you are done.\r\n");
PutS("#include \"Sound.CPZ\";");
ASCIIKeys("\r");
UntilASCIIKey(CH_ESC);
PopUpOk(
"The program is still in memory and we\r\n"
"can start it again by typing \"$$FG GREEN$$Organ;$$FG$$\".\r\n\r\n"
"Press $$FG GREEN$$ENTER$$FG$$ at the command line to\r\n"
"run it again.\r\n");
PutS("Organ;");
ASCIIKeys("\r");
UntilASCIIKey(27);
+95
View File
@@ -0,0 +1,95 @@
//This puts the cursor at the bottom
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN|SCF_CTRL);
PutS("\rCd(\"::/LT/DEMO\");Dir;\r");
PopUpOk(
"Now, we're going to add the Sound.CPZ\r\n"
"program to your start menu.\r\n\r\n"
"Press the $$FG GREEN$$WINDOW$$FG$$s key\r\n"
"to get to your menu/macro/help area.\r\n");
SpecialKey(SC_GUI,"WINDOWS KEY");
Msg(MSG_KEY_DOWN,0,SC_CURSOR_UP|SCF_CTRL);
Sleep(1000);
PopUpOk(
"Press $$FG GREEN$$CTRL-L$$FG$$ to invoke the\r\n"
"rich-text resource editor.\r\n");
SpecialASCIIKey(12,"CTRL-L");
PopUpOk(
"Press $$FG GREEN$$CURSOR-DOWN$$FG$$ until you reach\r\n"
"\"Macro\".\r\n");
I8 i;
for (i=0;i<8;i++)
SpecialKey(SC_CURSOR_DOWN,"CURSOR-DOWN");
PopUpOk(
"Press $$FG GREEN$$SPACE$$FG$$.\r\n");
ASCIIKeys(" ");
Sleep(1000);
PopUpOk(
"Now, we'll fill-in the visible text\r\n"
"of the macro.\r\n");
SlowASCIIAutoType("Click Here");
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN);
PopUpOk("Now, we'll fill-in the macro text.\r\n");
SlowASCIIAutoType("Cd(\\\"::/LT/DEMO\\\");;#include \\\"Sound.CPZ\\\";\\r");
PopUpOk("Press $$FG GREEN$$ESC$$FG$$ to exit the form.\r\n");
SpecialASCIIKey(CH_ESC,"ESC");
Sleep(1000);
PopUpOk("Press $$FG GREEN$$CTRL-SHIFT-ENTER$$FG$$ to insert a line feed.\r\n");
SpecialASCIIKey(CH_CR,"CTRL-SHIFT-ENTER",SCF_CTRL|SCF_SHIFT,SCF_CTRL|SCF_SHIFT);
Sleep(1000);
Msg(MSG_KEY_DOWN,0,SC_CURSOR_UP|SCF_CTRL);
PopUpOk(
"Press $$FG GREEN$$SPACE$$FG$$ to test it.\r\n");
ASCIIKeys(" ");
UntilASCIIKey(CH_ESC);
PopUpOk(
"Now, we'll do a fancier macro that pops-up\r\n"
"a new window which dies when finished,\r\n"
"returning memory to the system.\r\n");
Msg(MSG_KEY_DOWN,0,SC_GUI);
Msg(MSG_KEY_DOWN,0,SC_CURSOR_UP|SCF_CTRL);
Msg(MSG_KEY_DOWN,12,0); //CTRL-L
for (i=0;i<8;i++)
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN);
SlowASCIIAutoType(" Click here for Pop-up version");
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN);
SlowASCIIAutoType("Cd(\\\"::/LT/DEMO\\\");;#include \\\"Sound.CPZ\\\"\\r");
PopUpOk(
"Press $$FG GREEN$$CURSOR-DOWN$$FG$$ until you reach\r\n"
"the \"Pop-Up\" check-box.\r\n");
for (i=0;i<2;i++)
SpecialKey(SC_CURSOR_DOWN,"CURSOR-DOWN");
PopUpOk(
"Press $$FG GREEN$$SPACE$$FG$$ to\r\n"
"check the box.\r\n");
ASCIIKeys(" ");
Sleep(500);
PopUpOk("Press $$FG GREEN$$ESC$$FG$$ to exit the form.\r\n");
SpecialASCIIKey(CH_ESC,"ESC");
Sleep(500);
PopUpOk("Press $$FG GREEN$$CTRL-SHIFT-ENTER$$FG$$ to insert a line feed.\r\n");
SpecialASCIIKey(CH_CR,"CTRL-SHIFT-ENTER",SCF_CTRL|SCF_SHIFT,SCF_CTRL|SCF_SHIFT);
Sleep(500);
Msg(MSG_KEY_DOWN,0,SC_CURSOR_UP|SCF_CTRL);
PopUpOk(
"Press $$FG GREEN$$SPACE$$FG$$ to test it.\r\n");
ASCIIKeys(" ");
Sleep(5000);
PopUpOk(
"Press $$FG GREEN$$CTRL-S$$FG$$ to save your\r\n"
"macro/menu/help area file, if you wish.\r\n");
+58
View File
@@ -0,0 +1,58 @@
PopUp("WsInit(\"::/LT\");");
if (!ws_task)
ws_task=Spawn(&WsTsk,"WORDSTAT");
//This puts the cursor at the bottom
Msg(MSG_KEY_DOWN,0,SC_CURSOR_DOWN|SCF_CTRL);
PutS("\rCd(\"::/LT/DEMO\");\r");
PopUpOk(
"WordStat is an autocomplete feature\r\n"
"which will also jump to source code.\r\n\r\n"
"We will now place some text on the command\r\n"
"line and jump to source code.\r\n");
PutS("InstallB");
Sleep(1000);
PopUpOk(
"After clicking $$FG GREEN$$OKAY$$FG$$, look at\r\n"
"the $$FG GREEN$$InstallBoot$$FG$$ entry in the WordStat\r\n"
"window. Notice it has a '$$FG GREEN$$*$$FG$$' by it.\r\n"
"This means a source code link is available.\r\n");
sys_cur_focus_task=Fs->parent_tss;
Sleep(2000);
PopUpOk(
"Press $$FG GREEN$$CTRL-SHIFT-F1$$FG$$ to jump to source code.\r\n");
sys_cur_focus_task=Fs->parent_tss;
UntilSpecialKey(SC_F1|SCF_CTRL|SCF_SHIFT);
Sleep(2000);
PopUpOk(
"Press $$FG GREEN$$CTRL-Q$$FG$$ to quit the source code.\r\n");
UntilASCIIKey(CH_CTRLQ);
PopUpOk(
"Press $$FG GREEN$$CTRL-F1$$FG$$ to autocomplete.\r\n");
sys_cur_focus_task=Fs->parent_tss;
UntilSpecialKey(SC_F1|SCF_CTRL);
Sleep(500);
Msg(MSG_KEY_DOWN,CH_CR,SCF_CTRL|SCF_SHIFT);
PutS("\r");
PopUpOk(
"Tip: You can restart the WordStat window if you\r\n"
"have closed it by pressing $$FG GREEN$$CTRL-F1$$FG$$.\r\n");
PopUpOk(
"You can also use the $$FG GREEN$$Man()$$FG$$ function\r\n"
"to jump to source code.\r\n");
SlowASCIIAutoType("Man(\"InstallBoot\");");
Sleep(1000);
PutS("\r");
Sleep(2000);
PopUpOk(
"Press $$FG GREEN$$CTRL-Q$$FG$$ to quit the source code.\r\n");
UntilASCIIKey(CH_CTRLQ);
+10
View File
@@ -0,0 +1,10 @@
//This is the startup file for new local users
UseConsoleLtf("USER.MUZ");
Fs->answers_displayed=2; //from 0-8
LoadAdam3;
PutSysText("ST_USER_STARTUP");
Type("/LT/DOC/Help.TXZ");
Bts(&Fs->crt_flags,CRTf_SHOW);
if (Fs->user_num==1)
AutoFile("TOUR");