///////////////////////////////////////////////////////////////////////// // FKEY.SLT - by Terry Robertson (October 1988) // // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // // // This script will set up the function keys as described in the // // T3SCRIPT.DOC file. Please bear in mind that the script assumes // // that if you already have a TELIX.KEY file in which you have saved // // some key assignments of your own, you DO wish to overwrite that // // file. If this is not the case, either type in the new function // // key assignments as explained in the .DOC file or, rename your old // // TELIX.KEY file so that you still have it available for future use // // if required. // // // // The revised TELIX.KEY file will be loaded automatically and the // // function keys will work as advertised! // // // ///////////////////////////////////////////////////////////////////////// str pass1[20]; str pass2[20]; str F1[40] = "15104=^""; str F2[40] = "15360=^""; str F3[17] = "15616=^"@password^""; str F4[60] = "15872=^""; str F5[16] = "16128=^"@connect^""; str F6[16] = "16384=^"@bbnotes^""; str F7[13] = "16640=^"@help^""; str F8[14] = "16896=^"@time^""; str F9[11] = "17152=^"@on^""; str F10[12] = "17408=^"@off^""; str head[] = "FKEY - Function Key Configuration Script"; str aye[] = "A: Enter My FIRST Name "; str bee[] = "B: Enter My LAST Name "; str exe[] = "X: Exit without saving changes "; str ess[] = "S: Exit and save changes to disk "; str whch[] = "Which option? "; str fst[] = "What is your FIRST name? "; str lst[] = "What is your LAST name? "; int flag1; ////////////////////////////////////////////////////////////////////////////// main() { key_configure(); } ////////////////////////////////////////////////////////////////////////////// key_configure() { str s[100]; int c, f, i, stat; while (1) { clear_scr(); box(0, 0, 60, 10, 2, 0, 30); pstraxy(head, 3 ,1, 31); pstraxy(aye, 3, 3, 31); pstraxy(bee, 3, 4, 31); pstraxy(exe, 3, 5, 31); pstraxy(ess, 3, 6, 31); pstraxy(whch, 3, 8, 31); getsxy(s, 1, 17, 8, 31); pstra(""); c = toupper(subchr(s, 0)); if (c < 'A' || c > 'X') continue; // if (c >= 'A' && c <= 'B') // pstraxy(new, 3, 8, 31); if (c == 'A') { flag1=1; pstraxy(fst, 3, 8, 31); stat = getsxy(s, 15, 28, 8, 31); if (stat != -1) pass1 = s; } else if (c == 'B') { flag1=1; pstraxy(lst, 3, 8, 31); stat = getsxy(s, 20, 28, 8, 31); if (stat != -1) pass2 = s; } else if (c == 'X') { abort: clear_scr(); return; } else if (c == 'S') { if(flag1 < 1) goto abort; s = _telix_dir; strcat(s, "TELIX.KEY"); f = fopen(s, "w"); if (!f) { printsc("Error writing to "); printsc(s); prints("!"); continue; } strcat(F1, pass1); strcat(F1, "^^M"); strcat(F1, "^""); fputs(F1, f); fputs("^M^J", f); strcat(F2, pass2); strcat(F2, "^^M"); strcat(F2, "^""); fputs(F2, f); fputs("^M^J", f); fputs(F3, f); fputs("^M^J", f); strcat(F4, pass1); strcat(F4, " "); strcat(F4, pass2); strcat(F4, "^^M"); strcat(F4, "^""); fputs(F4, f); fputs("^M^J", f); fputs(F5, f); fputs("^M^J", f); fputs(F6, f); fputs("^M^J", f); fputs(F7, f); fputs("^M^J", f); fputs(F8, f); fputs("^M^J", f); fputs(F9, f); fputs("^M^J", f); fputs(F10, f); fputs("^M^J", f); clear_scr(); fclose(f); keyload("telix.key"); return; } } }