home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-12-15 | 59.1 KB | 2,144 lines |
- ======= MISCELLANEOUS CMDS =======
-
- Set max number of files can load for normal editing (1-100, usually 20)
- <altCtl-f1:
- putMsg("Input max # documents allowed (1-100)")
- if (inputNum(n54)) setMaxFiles(n54) >
-
- Set start of hilite region
- <shft-buttonDown:
- equateLoc(curFile,sHilite,mouseLoc) refreshDisplay >
-
- Set end of hilite region
- <alt-buttonDown:
- equateLoc(curFile,eHilite,mouseLoc) refreshDisplay >
-
- Mark region clicked with mouse
- <virtual-buttonDown:
- equateLoc(curFile,atCursor,mouseLoc)
- equateLoc(curFile,eInvert,atCursor)
- equateLoc(curFile,sInvert,atCursor)
- if (eqNum(curFile,38)) equateLoc(buf38,eHilite,sHilite)
- while (mouseDown) inputKey(n54)
-
- if (is(curFile,eFile) | is(curFile,whiteSpace)) returnFalse
-
- while (!is(curFile,whiteSpace) & !is(curFile,sFile))
- moveCursor(curFile,sChar) .. find start non-white
- if (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
- equateLoc(curFile,sInvert,atCursor) .. sinvert = start non-white
-
- while (!is(curFile,whiteSpace) & !is(curFile,eFile))
- moveCursor(curFile,eChar) .. find end non-white
- equateLoc(curFile,eInvert,atCursor) .. einvert = end non-white
- if (eqNum(curFile,38)) { .. in directory buffer 38
- equateLoc(curFile,sHilite,sInvert)
- equateLoc(curFile,eHilite,eInvert)
- equateLoc(curFile,sInvert,eInvert)
- moveCursor(curFile,sHilite)
- }
- refreshDisplay
- >
-
- Load File or select Directory that is CTRL-clicked.
- <ctl-buttonDown:
- equateNum(n7,curFile)
- if (!runKey(virtual-buttonDown)) { runKey(virtual-buttonUp) return }
- if (!eqNum(curFile,38)) {
- if (geLoc(curFile,sInvert,eInvert)) return .. no rgn
- moveCursor(curFile,sChar)
- if (!is(curFile,"/") & !is(curFile,":")) {
- freeBuf(buf54)
- moveCursor(curFile,sInvert)
- while (!eqLoc(curFile,atCursor,eInvert)) {
- if (is(curFile,":")) goto label(99)
- moveCursor(curFile,eChar)
- }
- insertRgn(buf54,sFile,buf38,hilite)
- label(99)
- insertRgn(buf54,eFile,curFile,invert)
- loadFile(buf54)
- return
- }
- moveCursor(curFile,eInvert)
- freeBuf(buf53)
- insertRgn(buf53,eFile,curFile,invert)
- runKey(virtual-7) .. add dir to buf38
- }
- runKey(virtual-9) .. show dir msg
- return
- >
-
- Handle buf38 directory traffic
- <virtual-buttonUp:
- runKey(virtual-8) .. load in dir defalts if not loaded
- equateLoc(buf38,mouseLoc,atCursor)
- equateNum(n8,0)
- if (!eqNum(curFile,38) & !gotoSplit(buf38)) {
- if (!splitWindow(buf38,7)) {
- putMsg("Close a split window so can let you select Directory")
- return
- }
- equateNum(n8,1) .. had to make split window
- }
- updateDisplay
- label(98)
- equateLoc(buf38,mouseLoc,sFile)
- putMsg(
- "Ctrl-mouse=SelectDir. F1=Edit. F2=DirList. F3=Save. F4=ChgDir. F5=CD.")
-
- while (mouseDown) inputKey(n54)
- getKeyVal(macroNum,inputChar)
- switch(macroNum) {
- case(normal-buttonDown) { .. done bring down window
- gotoSplit(buf[n7])
- if (eqNum(n8,1)) splitWindow(buf38,0) .. close it if made it
- runKey(virtual-9)
- return
- }
- case(normal-f1) { .. edit buf38
- putMsg("Press left-Amiga-0 to elim split window.")
- return
- }
- case(ctl-buttonDown) {
- runkey(virtual-buttonDown)
- refreshDisplay
- runKey(virtual-9)
- delay(3)
- }
- case(normal-f2) { .. get dir list
- gotoSplit(buf[n7])
- if (eqNum(n8,1)) splitWindow(buf38,0) .. close it if made it
- if (newFile) {
- setFileName(curFile,"DirList")
- clearRgn(curFile,all)
- insertRgn(curFile,atCursor,buf38,hilite)
- insertChar(curFile,eLine)
- equateLoc(curFile,sPage,sFile)
- updateDisplay
- freeBuf(buf54)
- insertRgn(buf54,eFile,"dir ",all)
- insertRgn(buf54,eFile,buf38,hilite)
- execute(curFile,buf54)
-
- .. massage dir list
- getSearch(buf49)
- setSearch(" (dir)")
- moveCursor(curFile,sFile)
- while (search(curFile,locA,locB,1)) {
- clearRgn(curFile,loc)
- insertChar(curFile,"/")
- moveCursor(curFile,sLine)
- moveCursor(curFile,eWord)
- moveCursor(curFile,sWord)
- insertRgn(curFile,atCursor,buf38,hilite)
- }
- setSearch(buf49) .. restore search string
- moveCursor(curFile,sFile)
- flipFlag(curFile,changed)
- putMsg("Ctl-click dirnames to add, filenames to load.")
- return
- } else putMsg("Can't open file buf for dir list")
- }
- case(normal-f3) { saveFile(buf38) }
- case(normal-f4) { .. change dir
- if (gtLoc(buf38,eHilite,sHilite)) {
- freeBuf(buf54)
- insertRgn(buf54,eFile,buf38,hilite)
- changeDir(buf54)
- goto label(0)
- }
- }
- case(normal-f5) { .. get CD
- label(0) freeBuf(buf53)
- execute(buf53,"CD")
- freeBuf(buf54)
- insertRgn(buf54,eFile,"CD = ",all)
- insertRgn(buf54,eFile,buf53,line)
- putMsg(buf54)
- delay(5)
- }
- }
- goto label(98)
- >
-
- Click or drag mouse, put word/phrase into index in buf41. (Ctl-w to see.)
- <shftAlt-buttonDown:
- equateLoc(curFile,atCursor,mouseLoc)
- moveCursor(curFile,eWord)
- equateLoc(curFile,eInvert,atCursor)
- moveCursor(curFile,sWord)
- equateLoc(curFile,sInvert,atCursor)
- refreshDisplay >
-
- Click or drag mouse, put word/phrase into index in buf41. (Ctl-w to see.)
- <shftAlt-buttonUp:
- equateLoc(curFile,atCursor,mouseLoc)
- moveCursor(curFile,eWord)
- equateLoc(curFile,eInvert,atCursor)
- if (geLoc(curFile,sInvert,eInvert)) returnFalse
- moveCursor(curFile,sInvert)
- if (is(curFile,upperCase)) equateNum(n0,1)
- else equateNum(n0,0)
- toLower(curFile)
- copyChar(curFile,n54)
- if (eqNum(n0,1)) toUpper(curFile)
- if (isEmpty(buf41)) insertChar(buf41,eLine)
- moveCursor(buf41,sFile)
- equateLoc(buf41,sPage,atCursor)
- label(1)
- if (is(buf41,upperCase)) equateNum(n0,1)
- else equateNum(n0,0)
- toLower(buf41)
- copyChar(buf41,n53)
- if (eqNum(n0,1)) toUpper(buf41)
- if (gtNum(n54,n53)) {
- moveCursor(buf41,downLine)
- if (!is(buf41,eFile)) goto label(1)
- }
- insertRgn(buf41,atCursor,curFile,invert)
- insertChar(buf41,eLine)
- >
-
- Set start of invert region
- <shftCtl-buttonDown:
- equateLoc(curFile,sInvert,mouseLoc) refreshDisplay >
-
- Set end of invert region
- <altCtl-buttonDown:
- equateLoc(curFile,eInvert,mouseLoc) refreshDisplay >
-
- Drag mouse and create hilite region
- <shftAltCtl-buttonDown:
- equateLoc(curFile,locA,mouseLoc)
- while (trackMouse) nothing
- if (gtLoc(curFile,locA,mouseLoc)) {
- equateLoc(curFile,sHilite,mouseLoc)
- equateLoc(curFile,eHilite,locA)
- } else {
- equateLoc(curFile,eHilite,mouseLoc)
- equateLoc(curFile,sHilite,locA)
- }
- refreshDisplay >
-
- Adjust active split window size with mouse
- <lAmiga-=:
- getSplitLines(n53,n52) .. see if is upper split
- if (eqNum(n53,0)) {
- putMsg("Adjust lower splits, not top one")
- returnFalse .. don't size main window
- }
- putMsg("Press button, move mouse to set split window size")
- getkey(N54)
- if (!mouseDown) return
- trackMouse
- mouseXY(n4,n5)
- equateNum(n54,curFile)
- label(0)
- if (inputWaiting) { putMsg(" ") return }
- trackMouse
- mouseXY(n2,n3)
- getSplitLines(n53,n52) .. get start & stop
- sub(n52,n52,n53)
- if (gtNum(n5,n3)) {
- if (gtNum(n53,3)) incNum(n52)
- else goto label(0)
- }
- else if (gtNum(n3,n5)) decNum(n52)
- else goto label(0)
- if (!eqNum(n5,n3)) {
- splitWindow(curFile,0)
- if (gtNum(2,n52)) equateNum(n52,2)
- splitWindow(buf[n54],n52)
- updateDisplay
- equateNum(n5,n3)
- }
- goto label(0)
- >
-
- Scroll up 1 line
- <normal-upArrow:
- if (!thisKey) vScroll(-1)
- else while (nothing) {
- if (!vScroll(-1) | !inputWaiting) return
- while (inputKey(n54)) nothing
- vScroll(-3)
- updateDisplay
- } >
-
- Scroll down 1 line
- <normal-downArrow:
- if (!thisKey) vScroll(1)
- else while (nothing) {
- if (!vScroll(1) | !inputWaiting) return
- while (inputKey(n54)) nothing
- vScroll(3)
- updateDisplay
- } >
-
- Scroll right 1 char
- <normal-leftArrow: hScroll(1) >
-
- Scroll left 1 char
- <normal-rightArrow: hScroll(-1) >
-
- Scroll up 11 lines
- <shft-upArrow: vScroll(-11) >
-
- Scroll down 11 lines
- <shft-downArrow: vScroll(11) >
-
- Scroll right 10 chars
- <shft-leftArrow: hScroll(10) >
-
- Scroll left 10 chars
- <shft-rightArrow: hScroll(-10) >
-
- Scroll to start of page
- <alt-upArrow: vScroll(sPage) >
-
- Scroll to bottom of page
- <alt-downArrow: vScroll(ePage) >
-
- Scroll right 20 chars
- <alt-leftArrow: hScroll(20) >
-
- Scroll left 20 chars
- <alt-rightArrow: hScroll(-20) >
-
- Scroll to start of file
- <ctl-upArrow: vScroll(sFile) >
-
- Scroll to end of file
- <ctl-downArrow: vScroll(eFile) >
-
- Scroll to end of line
- <ctl-leftArrow:
- getLocal(curFile,n54,lineLength)
- hScroll(n54) >
-
- Scroll to start of line
- <ctl-rightArrow: while (hScroll(-1)) nothing >
-
- Load and show help file - press again to release help
- <normal-help:
- if (!isEmpty(buf42)) {
- equateNum(n54,curFile)
- if (eqNum(n54,42)) freeBuf(buf42)
- else editBuf(buf42)
- } else {
- insertFile(buf42,sFile,"Help!")
- if (isEmpty(buf42)) {
- freeBuf(buf42)
- insertFile(buf42,sFile,"S:Help!")
- }
- if (!isEmpty(buf42)) {
- editBuf(buf42)
- flipFlag(buf42,readOnly)
- } else putMsg("Can't find S:Help! file.")
- } >
-
- Show current values of line-length, lines/page, tab-table #, colors, etc
- <shft-help:
- putMsg(" ")
- equateLoc(curfile,locA,atCursor)
- moveCursor(curfile,sFile)
- moveCursor(curfile,eLine)
- copyChar(curfile,n52)
- moveCursor(curfile,locA)
- updateDisplay
- equateNum(n51,curFile)
- text(" ",0,0,0,-2)
- text("Serial number: Left margin :",2,0,0,0)
- text("Buffer : Top margin :",3,0,0,0)
- text("Changed : Bottom margin :",4,0,0,0)
- text("Size : Tab table :",5,0,0,0)
- text("Max files : Printer select :",6,0,0,0)
- text("Split size : (unused) :",7,0,0,0)
- text("Idle timer : Print tabs :",8,0,0,0)
- text("Colors : Smart tabs :",9,0,0,0)
- text("Scroll type : Search wildcard :",10,0,0,0)
- text("Hide display : \"\" multiWild :",11,0,0,0)
- text("End-of-line : \"\" allBut :",12,0,0,0)
- text("PM terminator: \"\" eitherOr :",13,0,0,0)
- text("Line length : \"\" singleWhite :",14,0,0,0)
- text("Lines/page : \"\" multiWhite :",15,0,0,0)
- text("Values for this buffer",1,0,5,0)
- getSerialNum(n54)
- text(n54,2,16,1,0)
- getLocal(curFile,n54,leftMargin)
- text(n54,2,56,1,0)
- text(n51,3,16,1,0) ..buffer number
- getLocal(curFile,n54,topMargin)
- text(n54,3,56,1,0)
- if (getFlag(curFile,changed)) text("YES",4,16,2,0)
- else text("no",4,16,1,0)
- getLocal(curFile,n54,bottomMargin)
- text(n54,4,56,1,0)
- getLocal(curFile,n54,tabTable) .. SEE BELOW - computing file size last
- text(n54,5,56,1,0)
- getMaxFiles(n54)
- text(n54,6,16,1,0)
- text(prefPrint,6,56,1,0)
- text(splitSize,7,16,1,0)
- text(0,7,56,1,0)
- text(idleTime,8,16,1,0)
- text(printTabs,8,56,1,0)
- freeBuf(buf53)
- getWBColors(n0,n1,n2,n3)
- toWord(buf53,n0)
- toWord(buf53,n1)
- toWord(buf53,n2)
- toWord(buf53,n3)
- text(buf53,9,16,1,0)
- text(smartTabs,9,56,1,0)
- text(scrollType,10,16,1,0)
- freeBuf(buf53)
- insertChar(buf53,wildCard)
- text(buf53,10,56,1,0)
- if (getFlag(curFile,hideDisplay)) text("YES",11,16,2,0)
- else text("no",11,16,1,0)
- freeBuf(buf53)
- insertChar(buf53,multiWild)
- text(buf53,11,56,1,0)
- text(n52,12,16,1,0) .. eol, copied it above
- freeBuf(buf53)
- insertChar(buf53,allBut)
- text(buf53,12,56,1,0)
- text(pmESC,13,16,1,0)
- freeBuf(buf53)
- insertChar(buf53,eitherOr)
- text(buf53,13,56,1,0)
- getLocal(curFile,n54,lineLength)
- text(n54,14,16,1,0)
- text(singleWhite,14,56,1,0)
- getLocal(curFile,n54,pageLines)
- text(n54,15,16,1,0)
- text(multiWhite,15,56,1,0)
- putMsg("Any key to continue")
- fileSize(curFile,n54)
- text(n54,5,16,1,0)
- getKey(n54)
- putMsg(" ")
- refreshDisplay >
-
- Rotate 4 Workbench colors in Uedit
- <alt-help: toggle(color) >
-
- Start this Key-Help mode - press Amiga-ESC to leave this Key-Help mode
- <ctl-help: flipFlag(curFile,teachKeys) >
-
- Refresh window (or screen in interlace), including title bar
- <shftCtl-help: refreshDisplay >
-
- Rebuild the menus by running the startup command
- <shftAltCtl-Help: runKey(startup) >
-
- Close file. If changed, ask "Save changes?" If no files, ask "Really quit?"
- <normal-closeBox:
- if (getFlag(curfile,changed) &
- askYesNo("Save changes?") &
- !saveFile(curFile)) return
- freeBuf(curFile)
- if (isEmpty(curFile)) {
- equateNum(n1,0)
- getMaxFiles(n2)
- decNum(n2)
- do (n0,0,n2) if (!isEmpty(buf[n0])) equatenum(n1,1)
- if (eqNum(n1,0) & askYesNo("Really quit?")) quit(0)
- } >
-
- Switch to next document
- <normal-gadget1: toggle(curFile) >
-
- Switch to previous document
- <normal-gadget2: runKey(shft-f1) >
-
- Scroll display down
- <normal-gadget3: while (mouseDown) { vScroll(downLine) updateDisplay } >
-
- Scroll display up
- <normal-gadget4: while (mouseDown) { vScroll(upLine) updateDisplay } >
-
- Switch to next file
- <normal-f1: toggle(curFile) >
-
- Switch to previous file
- <shft-f1:
- getMaxFiles(n53)
- if (geNum(1,n53)) { editBuf(buf0) returnFalse }
- decNum(n53)
- equateNum(n54,curFile)
- while (nothing) {
- if (gtNum(n54,n53)) equateNum(n54,n53)
- decNum(n54)
- if (gtNum(0,n54)) equateNum(n54,n53)
- if (getFileName(buf54,buf[n54])) {
- editBuf(buf[n54])
- returnTrue
- }
- } >
-
- Load a file
- <alt-f1:
- putMsg("Input new filename:")
- freeBuf(buf43)
- if (inputString(buf43)) loadFile(buf43) >
-
- Open new "Noname" file
- <ctl-f1: newFile >
-
- Insert file at cursor
- <shftAlt-f1:
- putMsg("Input filename to insert:")
- freeBuf(buf43)
- if (inputString(buf43)) insertFile(curFile,atCursor,buf43) >
-
- Restore current file to original
- <shftCtl-f1:
- if (!askYesNo("Restore file to original?")) returnFalse
- if (getFileName(buf43,curFile)) { freeBuf(curFile) loadFile(buf43) } >
-
- Bring up file-requester
- <lAmiga-f1:
- freeBuf(buf54)
- insertRgn(buf54,eFile,buf38,hilite)
- moveCursor(buf54,efile)
- moveCursor(buf54,sChar)
- if (!is(buf54,sfile) & is(buf54,"/")) clearChar(buf54)
- if (fileRequest(buf54,"Select Directory and/or File")) {
- freeBuf(buf53) .. if True, always has 2 lines
- insertRgn(buf53,efile,buf54,all)
- moveCursor(buf53,sfile)
- if (!is(buf53,eline)) moveCursor(buf53,eLine)
- clearChar(buf53) .. erase the eol
- loadFile(buf53)
- }
- if (isEmpty(buf54)) {
- putMsg("No selection or no Arp")
- returnFalse
- }
- moveCursor(buf54,sfile) .. puts filename on line 2. outputs "*" if no
- if (!is(buf54,"*") & !is(buf54,eLine)) {
- freeBuf(buf53)
- insertRgn(buf53,efile,buf54,line)
- runKey(virtual-7) .. store dirname in buf38, if not already there
- }
- >
-
- Save file currently in window
- <normal-f2: saveFile(curFile) >
-
- Save file under different name
- <shft-f2:
- putMsg("Save file as:")
- freeBuf(buf43)
- if (inputString(buf43) & setFileName(curFile,buf43)) saveFile(curFile) >
-
- Save all changed files
- <alt-f2:
- getMaxFiles(n53)
- decNum(n53)
- do(n54,0,n53) if (getFlag(buf[n54],changed)) saveFile(buf[n54]) >
-
- Turn on/off saving changes during idle periods
- <ctl-f2: flipFlag(curFile,userLocalA)>
-
- Abort the current file save
- <shftAlt-f2: abortSave >
-
- Save hilite as...
- <shftCtl-f2:
- freeBuf(buf43)
- insertRgn(buf43,atCursor,buf38,hilite)
- putMsg("Save hilite as:")
- if (!inputString(buf43)) return
- freeBuf(buf54)
- insertRgn(buf54,efile,curFile,hilite)
- setFileName(buf54,buf43)
- saveFile(buf54)
- freeBuf(buf54) >
-
- Close current file. If changed, ask "Save changes?"
- <normal-f3:
- if (!isEmpty(curFile)
- & getFlag(curFile,changed)
- & askYesNo("Save changes before closing?")
- & !saveFile(curFile)) returnFalse
- freeBuf(curFile) >
-
- Save file, if changed, then close it
- <shft-f3:
- if (getFlag(curFile,changed) & !saveFile(curFile)) returnFalse
- freeBuf(curFile) >
-
- Free all non-file buffers. Erases search buffer, directory name, etc
- <alt-f3:
- getMaxFiles(n52)
- do(n54,n52,54) freeBuf(buf[n54]) >
-
- Ask "Save changes?", if any changes, then ask "Really quit?"
- <normal-f4:
- if (!askYesNo("Really quit?")) returnFalse
- equateNum(n53,0)
- getMaxFiles(n52)
- decNum(n52)
- do(n54,0,n52) if (getFlag(buf[n54],changed)) equateNum(n53,1)
- if (eqNum(n53,1) & askYesNo("Save changes?") & !runKey(shft-f4))
- returnFALSE
- quit(0) >
-
- Save all changed files automatically, then quit
- <shft-f4:
- getMaxFiles(n52)
- decNum(n52)
- do (n54,0,n52)
- if (getFlag(buf[n54],changed) & !saveFile(buf[n54])) returnFalse
- quit(0) >
-
- Swap next 2 commands. (Mouse buttons, menu selections, gadgets, keys.)
- <normal-f5:
- putMsg("Next 2 function keys will be swapped!")
- if (getKey(n53) & getKey(n54) & swapKey(n53,n54))
- { putMsg("Keys were swapped.") return }
- putMsg(" ") >
-
- Toggle overstrike typing mode
- <shft-f5: flipFlag(curFile,overstrike) >
-
- Toggle autoindent typing mode
- <alt-f5: flipFlag(curFile,autoIndent) >
-
- Toggle wordwrap typing mode
- <ctl-f5: flipFlag(curFile,wordWrap) >
-
- Toggle "changed" status of current buffer
- <lAmiga-f5: flipFlag(curFile,changed) >
-
- Convert file to read-only status
- <shftAlt-f5: flipFlag(curFile,readOnly) >
-
- Toggle speak-messages status
- <shftCtl-f5: flipFlag(curFile,speakMsgs) >
-
- Toggle speak-alerts status
- <altCtl-f5: flipFlag(curFile,speakAlerts) >
-
- Toggle auto-backup mode
- <shftAltCtl-f5: flipFlag(curFile,autoBackup) >
-
- Save Uedit state
- <rAmiga-f5: saveState("uestate")>
-
- Load Uedit state
- <rAmiga-f6: loadState("uestate")>
-
- Select buffer 44 to use for scratch editing or writing commands
- <shft-f6:
- editBuf(buf44)
- putMsg("Type in command, <anykey: etc>, and press F6 to compile:") >
-
- Save UE config to disk. Default is Data! or last name you gave
- <alt-f6:
- if (askYesNo("Save data?")) {
- putMsg("Input data filename or pmESC:")
- freeBuf(buf54)
- inputString(buf54)
- saveConfig(buf54)
- } >
-
- Restore UE config from disk. Default is Data! or last name you gave
- <ctl-f6:
- if (askYesNo("Load data?")) {
- putMsg("Input data filename or pmESC:")
- freeBuf(buf54)
- inputString(buf54)
- loadConfig(buf54)
- } >
-
- Compile configuration default values at the top of Config! file
- <altCtl-f6:
- moveCursor(curFile,sFile)
- if (!compileDefaults) beepDisplay>
-
- Input the number of a buffer to edit
- <shftAlt-f6:
- putMsg("Input number of buffer to edit:")
- if (inputNum(n54)) { editBuf(buf[n54]) vScroll(sFile) } >
-
- Examine all buffers that aren't empty
- <shftCtl-f6:
- getMaxFiles(n52)
- do (n54,n52,99) if (!isEmpty(buf[n54])) {
- editBuf(buf[n54])
- vScroll(sFile)
- updateDisplay
- putMsg("F1=continue, F2=edit this one, F3=stop:")
- getKey(n53)
- if (eqNum(n53,normal-f2)) { putMsg(" ") return }
- if (eqNum(n53,normal-f3)) goto label(1)
- }
- label(1)
- toggle(curFile)
- putMsg(" ") >
-
- Kill next command, including mouse button, menu selection, gadget, key
- <shftAltCtl-f6:
- putMsg("Next command-key will be deleted!")
- if (getKey(n54) & killKey(n54))
- { putMsg("Key command was deleted.") return }
- putMsg(" ") >
-
-
- Find out if keys have got commands attached
- <lAmiga-f6:
- putMsg("Press any key")
- while (getKey(n54)) {
- if (inUse(n54)) putMsg("In use - Amiga-esc=abort")
- else putMsg("Available - Amiga-esc=abort")
- }>
-
- Push current buffer onto buffer stack
- <lAmiga-w: push(buf99,curFile) runKey(virtual-w) >
-
- Pop buffer stack
- <rAmiga-w:
- equateNum(n51,99) .. for buf stack 99
- getStackSize(n51,n52,n53)
- if (geNum(0,n51)) {
- putMsg("Buffer stack is empty")
- returnFalse
- }
- if (!askYesNo("Replace current buffer, deleting old?") & !newFile) {
- putMsg("Can't open a file buffer")
- returnFalse
- }
- pop(buf99,curFile)
- runKey(virtual-w) >
-
- Rotate buffer stack
- <shftAlt-w: rollStack(buf99,1) runKey(virtual-w) >
-
- Show number of buffers in stack
- <virtual-w:
- equateNum(n51,99) .. for buffer stack 99
- equateNum(n52,99) .. and num stack 99
- getStackSize(n51,n52,n53)
- freeBuf(buf54)
- insertRgn(buf54,atCursor,"Buffers on stack: ",all)
- toWord(buf54,n51)
- putMsg(buf54) >
-
- Input search text & search fwd. (Either-Or="$", wildcards= "?" & "*".)
- <normal-f7: freeBuf(buf49) runKey(shft-f7) >
-
- Modify existing search text and then search fwd
- <shft-f7:
- putMsg("Input search string:")
- inputString(buf49)
- setSearch(buf49)
- runKey(normal-f9) >
-
- Input new search wild-card characters
- <alt-f7:
- putMsg("Input single wild-card char:")
- getChar(wildCard)
- putMsg("Input multi wild-card char:")
- getChar(multiWild)
- putMsg("White on single wildcards: 0=no, 1=space/tab, 2=all white:")
- getChar(n54)
- if (geNum(n54,"0") & geNum("2",n54)) sub(singleWhite,n54,"0")
- putMsg("White on multi wildcards: 0=no, 1=space/tab, 2=all white:")
- getChar(n54)
- if (geNum(n54,"0") & geNum("2",n54)) sub(multiWhite,n54,"0")
- putMsg("Input all-but delimiter char:")
- getChar(allBut)
- putMsg(" ")>
-
- Input new search either-or character
- <ctl-f7:
- putMsg("Input new search either-or char:")
- getChar(eitherOr)
- putMsg(" ")>
-
- Input replace text to use in search-replace
- <normal-f8: freeBuf(buf48) runKey(shft-f8) >
-
- Modify existing replace text
- <shft-f8: putMsg("input replace string:") inputString(buf48) >
-
- Search forward, mark matched region, put cursor at start of rgn
- <normal-f9:
- if (eqLoc(curFile,atCursor,eInvert)) moveCursor(curFile,sChar)
- if (search(curFile,sInvert,eInvert,1)) {
- putMsg(" ")
- return
- }
- runKey(virtual-f9) > .. failed search msg
-
- Search backward, mark matched region, put cursor at start of rgn
- <shft-f9:
- if (search(curFile,sInvert,eInvert,-1)) { putMsg(" ") return }
- runKey(virtual-f9) > .. failed search msg
-
- Failed search message used by fwd/bkwd search.
- <virtual-f9:
- putMsg("Search failed.")
- equateLoc(curFile,sInvert,eInvert)
- refreshDisplay
- returnFalse >
-
- Replace matched region with replace text, then search forward
- <normal-f10:
- if (eqLoc(curFile,sInvert,eInvert)) returnFalse
- clearRgn(curFile,invert)
- insertRgn(curFile,sInvert,buf48,all)
- runKey(normal-f9) >
-
- Replace matched region with replace text, then search backward
- <shft-f10:
- if (eqLoc(curFile,sInvert,eInvert)) returnFalse
- clearRgn(curFile,invert)
- insertRgn(curFile,sInvert,buf48,all)
- runKey(shft-f9) >
-
- Replace and continue forward search-replace until search fails
- <alt-f10: while(runKey(normal-f10)) nothing >
-
- Open a space under cursor for typing
- <shft-del:
- insertChar(curFile," ") moveCursor(curFile,sChar)
- if (is(curFile,sLine)) refreshDisplay>
-
- Open line for typing below cursor line
- <alt-del:
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- insertChar(curFile,eLine)>
-
- Delete line above cursor line
- <ctl-del:
- equateLoc(curFile,mouseLoc,atCursor)
- if (!is(curFile,sLine)) moveCursor(curFile,sLine)
- if (!is(curFile,sFile)) {
- moveCursor(curFile,upLine)
- runKey(virtual-x) .. this runs ctl-d
- moveCursor(curFile,mouseLoc)
- }>
-
- Open a space for typing in front of current word
- <shft-bs:
- if (!is(curFile,sWord)) moveCursor(curFile,sWord)
- runKey(shft-del)>
-
- Open line for typing above the current line
- <alt-bs:
- if (!is(curFile,sLine)) moveCursor(curFile,sLine)
- insertChar(curFile,eLine) moveCursor(curFile,sChar)>
-
- Delete line below cursor line
- <ctl-bs:
- equateLoc(curFile,mouseLoc,atCursor)
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- if (!is(curFile,eFile)) {
- moveCursor(curFile,downLine)
- runKey(virtual-x) .. this runs ctl-d
- moveCursor(curFile,mouseLoc)
- }>
-
- *** Keypad Keys ***
- Find cursor and center it in window
- <normal-kp5: vScroll(atCursor) >
-
- Delete word left, storing it in Undo buffer
- <normal-kp7:
- if (!eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locB,atCursor)
- moveCursor(curFile,sWord)
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
-
- Delete word right, storing it in Undo buffer
- <normal-kp9:
- if (!eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,eWord)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
-
- Move cursor up 1 line
- <normal-kp8: moveCursor(curFile,upLine) >
-
- Move cursor down 1 line
- <normal-kp2: moveCursor(curFile,downLine) >
-
- Move cursor to start of word
- <normal-kp4: moveCursor(curFile,sWord) >
-
- Move cursor to end of word
- <normal-kp6: moveCursor(curFile,eWord) >
-
- Set start of hilite region at cursor
- <normal-kp1: equateLoc(curFile,sHilite,atCursor) refreshDisplay >
-
- Set end of hilite region at cursor
- <normal-kp3: equateLoc(curFile,eHilite,atCursor) refreshDisplay >
-
- UNDO scratch deletes, inserting scratch delete buffer at cursor
- <normal-kp0: insertRgn(curFile,atCursor,buf45,all) >
-
- Copy hilite region into buffer
- <normal-kpDot:
- if (getFlag(curFile,columnar)) { runKey(shftCtl-3) return }
- if (gtLoc(curFile,eHilite,sHilite)) {
- freeBuf(buf47)
- insertRgn(buf47,sFile,curFile,hilite)
- equateLoc(buf47,sPage,sFile)
- } else returnFalse >
-
- Copy hilite region into buffer, then delete hilite region
- <normal-kpMinus:
- if (getFlag(curFile,columnar)) { runKey(shftCtl-1) return }
- if (runKey(normal-kpDot)) clearRgn(curFile,hilite)
- vscroll(atcursor) >
-
- Insert copied hilite at cursor
- <normal-kpEnter:
- if (getFlag(curFile,columnar)) { runKey(shftCtl-4) return }
- if (is(curFile,sFile)) {
- equateLoc(curFile,sHilite,atCursor)
- equateLoc(curFile,eHilite,sHilite)
- } else {
- equateLoc(curFile,sHilite,atCursor)
- decLoc(curFile,sHilite)
- equateLoc(curFile,eHilite,atCursor)
- }
- insertRgn(curFile,atCursor,buf47,all)
- if (eqLoc(curFile,atCursor,sHilite)) equateLoc(curFile,sHilite,sFile)
- else incLoc(curFile,sHilite)
- if (!onScreen(atCursor)) vScroll(atCursor) >
-
- Find cursor and center it in window
- <shft-kp5: vScroll(atCursor) >
-
- Delete char to left of cursor, storing it in Undo buffer
- <shft-kp7:
- if (!eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locB,atCursor)
- moveCursor(curFile,sChar)
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
-
- Delete char under cursor, storing it in Undo buffer
- <shft-kp9:
- if (!eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,eChar)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
-
- Move cursor up one line
- <shft-kp8: moveCursor(curFile,upLine) >
-
- Move cursor down one line
- <shft-kp2: moveCursor(curFile,downLine) >
-
- Move cursor left 1 char
- <shft-kp4: moveCursor(curFile,sChar) >
-
- Move cursor right 1 char
- <shft-kp6: moveCursor(curFile,eChar) >
-
- Set start of hilite region at cursor
- <shft-kp1: runKey(normal-kp1) >
-
- Set end of hilite region at cursor
- <shft-kp3: runKey(normal-kp3) >
-
- UNDO scratch deletes, inserting scratch delete buffer at cursor
- <shft-kp0: runKey(normal-kp0) >
-
- Copy hilite region into buffer
- <shft-kpDot: runKey(normal-kpDot) >
-
- Copy hilite region into buffer, then delete hilite region
- <shft-kpMinus: runKey(normal-kpMinus) >
-
- Insert copied hilite region at cursor
- <shft-kpEnter: runKey(normal-kpEnter) >
-
- Find cursor and center it in window
- <alt-kp5: vScroll(atCursor) >
-
- Delete to start of line, storing it in Undo buffer
- <alt-kp7:
- if (!eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- if (is(curFile,sLine)) runKey(shft-kp7)
- else {
- equateLoc(curFile,locB,atCursor)
- moveCursor(curFile,sLine)
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc)
- } >
- Delete to end of line, storing it in Undo buffer
- <alt-kp9:
- if (!eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- if (is(curFile,eLine)) runKey(shft-kp9)
- else {
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,eLine)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc)
- } >
-
- Move cursor to start of page
- <alt-kp8: moveCursor(curFile,sPage) vScroll(atCursor)>
-
- Move cursor to end of page
- <alt-kp2: moveCursor(curFile,ePage) >
-
- Move cursor to start of line
- <alt-kp4: moveCursor(curFile,sLine) >
-
- Move cursor to end of line
- <alt-kp6: moveCursor(curFile,eLine) >
-
- Set start of hilite region at cursor
- <alt-kp1: runKey(normal-kp1) >
-
- Set end of hilite region at cursor
- <alt-kp3: runKey(normal-kp3) >
-
- UNDO scratch deletes, inserting scratch delete buffer at cursor
- <alt-kp0: runKey(normal-kp0) >
-
- Copy hilite region into buffer
- <alt-kpDot: runKey(normal-kpDot) >
-
- Copy hilite region into buffer, then delete hilite region
- <alt-kpMinus: runKey(normal-kpMinus) >
-
- Insert copied hilite region at cursor
- <alt-kpEnter: runKey(normal-kpEnter) >
-
- Find cursor and center it in window
- <ctl-kp5: vScroll(atCursor) >
-
- Delete from cursor to start of page, storing it in Undo buffer
- <ctl-kp7:
- if (!eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locB,atCursor)
- moveCursor(curFile,sPage)
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc)
- vScroll(atCursor)
- updateDisplay >
-
- Delete from cursor to end of page, storing it in Undo buffer
- <ctl-kp9:
- if (!eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,ePage)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc)
- updateDisplay >
-
- Move cursor to start of form
- <ctl-kp8: moveCursor(curFile,sForm) >
-
- Move cursor to end of form
- <ctl-kp2: moveCursor(curFile,eForm) >
-
- Move cursor to start of line
- <ctl-kp4: moveCursor(curFile,sLine) >
-
- Move cursor to end of line
- <ctl-kp6: moveCursor(curFile,eLine) >
-
- Set start of invert region at cursor
- <ctl-kp1: equateLoc(curFile,sInvert,atCursor) refreshDisplay >
-
- Set end of invert region at cursor
- <ctl-kp3: equateLoc(curFile,eInvert,atCursor) refreshDisplay >
-
- UNDO scratch deletes, inserting scratch delete buffer at cursor
- <ctl-kp0: runKey(normal-kp0) >
-
- Give message telling turn OFF columnar if columnar is ON.
- <virtual-kpDot:
- if (getFlag(curFile,columnar)) {
- alertuser("Turn OFF columnar display mode first. (See Columnar menu.)")
- abort
- } >
-
- Copy invert region into buffer
- <ctl-kpDot:
- runKey(virtual-kpDot)
- if (gtLoc(curFile,eInvert,sInvert)) {
- freeBuf(buf46)
- insertRgn(buf46,sFile,curFile,invert)
- equateLoc(buf46,sPage,sFile)
- } else returnFalse >
-
- Copy invert region into buffer, then delete invert region
- <ctl-kpMinus:
- runKey(virtual-kpDot)
- runKey(ctl-kpDot)
- clearRgn(curFile,invert) >
-
- Insert copied invert region at cursor
- <ctl-kpEnter:
- runKey(virtual-kpDot)
- if (is(curFile,sFile)) {
- equateLoc(curFile,sInvert,atCursor)
- equateLoc(curFile,eInvert,sInvert)
- } else {
- equateLoc(curFile,sInvert,atCursor)
- decLoc(curFile,sInvert)
- equateLoc(curFile,eInvert,atCursor)
- }
- insertRgn(curFile,atCursor,buf46,all)
- if (eqLoc(curFile,atCursor,sInvert)) equateLoc(curFile,sInvert,sFile)
- else incLoc(curFile,sInvert)
- if (!onScreen(atCursor)) vScroll(atCursor) >
-
- *** miscellaneous keys ***
-
- Set new line-length
- <ctl-return:
- putMsg("Enter new line-length:")
- if (inputNum(n54)) {
- setLocal(curFile,lineLength,n54)
- equateNum(lineLength,n54)
- } >
-
- Transparent tab forward
- <shft-tab: moveCursor(curFile,eTab) >
-
- Transparent tab backward
- <alt-tab: moveCursor(curFile,sTab) >
-
- Untab - delete white space back to previous tab column
- <ctl-tab:
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,sTab)
- while (is(curFile,space) | is(curFile,9)) {
- clearChar(curFile)
- if (eqLoc(curFile,atCursor,locA)) return
- }>
-
- Switch to/from using spaces for tabs or using real tabs
- <altCtl-tab: flipFlag(curFile,trueTabs)>
-
- Show tab ruler above cursor line
- <shftAlt-tab: seeRuler>
-
- Set tab ruler using mouse or keys
- <shftCtl-tab:
- putMsg(
- "Use mouse click/drag, Tab, Space, BS, Del (anykey=quit,Amiga-ESC=abort)")
- setRuler putMsg(" ") >
-
- Convert tabs in document to spaces
- <lAmiga-t: tabsToSpaces >
-
- Convert spaces in document to TABs
- <rAmiga-t: spacesToTabs >
-
- Set TAB table number (0-4) to use for TAB spacing
- <shftAltCtl-tab:
- putMsg("Enter new tab table # (0-4):")
- if (inputNum(n54) & geNum(n54,0) & geNum(4,n54)) {
- setLocal(curFile,tabTable,n54)
- equateNum(tabTable,n54)
- } >
-
- Toggle "busies" setting - when turned on, it shows buffers being worked on
- <ctl-b: flipFlag(curFile,busies) >
-
- Trim spaces between the next two words after cursor
- <alt-c:
- while (copyChar(curfile,n54)
- & !(eqNum(n54,32) | eqNum(n54,9) | is(curfile,efile)))
- moveCursor(curFile,eChar)
- moveCursor(curFile,eChar)
- if (is(curfile,efile)) returnFalse
- while (copyChar(curfile,n54)
- & (eqNum(n54,32) | eqNum(n54,9)))
- clearChar(curfile) >
-
- Let next character typed be a CTRL-character, such as formfeed, etc
- <ctl-c:
- putMsg("Input a control character:")
- getChar(n54)
- if (geNum(31,n54) | (geNum(n54,64) & geNum(127,n54))) {
- and(n54,n54,31)
- insertChar(curFile,n54)
- }
- putMsg(" ") >
-
- Count number of times the next command is successfully executed
- <shftAlt-c:
- equateNum(n90,0)
- putMsg("Input command to execute & count:")
- if (getKey(n91)) {
- while (runKey(n91)) incNum(n90)
- freeBuf(buf54)
- insertRgn(buf54,sFile,"Times executed = ",all)
- toWord(buf54,n90)
- putMsg(buf54)
- } >
-
- Delay the amount of time (tenths of seconds) stored using shftAlt-d
- <alt-d: delay(n46) >
-
- Delete cursor line, storing it in Undo buffer. (See keypad-0/7/9.)
- <ctl-d: runKey(virtual-x)
- >
-
- Delete cursor line
- <virtual-x:
- if (!eqLoc(curFile,locB,atCursor)) freeBuf(buf45)
- equateLoc(curFile,locB,atCursor)
- if (!is(curFile,sLine)) moveCursor(curFile,sLine)
- if (!eqLoc(curFile,locB,atCursor)) {
- equateLoc(curFile,locA,atCursor)
- insertRgn(buf45,sFile,curFile,loc)
- clearRgn(curFile,loc)
- } else equateLoc(curFile,locA,atCursor)
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- moveCursor(curFile,eChar)
- equateLoc(curFile,locB,atCursor)
- insertRgn(buf45,eFile,curFile,loc)
- equateLoc(buf45,sPage,sFile)
- clearRgn(curFile,loc) >
-
- Set the delay variable to some value in tenths of seconds
- <shftAlt-d:
- putMsg("Input # tenths of seconds (used in delays)")
- inputNum(n46) >
-
- Change end-of-line character
- <alt-e:
- putMsg("Input new end-of-line value (usually 10 or 13):")
- inputNum(n54)
- setEol(n54)
- refreshDisplay >
-
- Change current document's end-of-line character
- <ctl-e:
- putMsg("Input file's current end-of-line value (usually 10 or 13):")
- inputNum(n54)
- if (!gtNum(n54,0)) returnFalse
- putMsg("Input new end-of-line value (usually 10 or 13):")
- inputNum(n53)
- if (!gtNum(n53,0)) returnFalse
- setEol(n54)
- moveCursor(curFile,sFile)
- putMsg("Changing eol characters... Amiga-ESC=abort.")
- if (is(curFile,n54)) swapChar(curFile,n53)
- while (moveCursor(curFile,eLine))
- if (is(curFile,n54)) swapChar(curFile,n53)
- setEol(n53)
- vScroll(sFile)
- putMsg(" ")
- refreshDisplay >
-
- Input the number of buffer to free
- <alt-f:
- putMsg("Input buffer # to free:")
- if (inputNum(n54)) freeBuf(buf[n54]) >
-
- Flip upper/lower case of char under cursor
- <ctl-f:
- if (is(curFile,alpha)) {
- if (is(curFile,lowerCase)) toUpper(curFile)
- else toLower(curFile)
- }
- moveCursor(curFile,eChar) >
-
- Toggle the mark-gadgets setting. When "off", the gadget names don't show
- <ctl-g: flipFlag(curFile,markGadgets) >
-
- Input a new lines/page value
- <alt-g:
- putMsg("Enter new lines/page setting:")
- inputNum(n54)
- if (gtNum(n54,0)) {
- setLocal(curFile,pageLines,n54)
- equateNum(pageLines,n54)
- } >
-
- Uncolor the hilite region
- <alt-h: equateLoc(curFile,sHilite,eHilite) refreshDisplay >
-
- Erase hilite region. No Copy is made!
- <ctl-h: clearRgn(curFile,hilite) >
-
- Uncolor the invert region
- <alt-i: equateLoc(curFile,sInvert,eInvert) refreshDisplay >
-
- Erase the invert region. No Copy is made!
- <ctl-i: clearRgn(curFile,invert) >
-
- Scan index buffer, build an index. (See shftAlt-buttonDown/buttonUp.)
- <shftAlt-i:
- if (isEmpty(buf41)) returnFalse
- runKey(alt-g) .. Could elim. get lines-per-page setting to use
- freeBuf(buf54)
- putMsg("Working....") .. erase duplicate items in buf41
- label(10) .. get next index item
- moveCursor(buf41,sFile)
- while (is(buf41,whiteSpace)) clearChar(buf41) .. clear any blank lines
- if (is(buf41,eFile)) goto label(11) .. done finding duplicates
- equateLoc(buf41,sInvert,atCursor) .. mark start
- moveCursor(buf41,downLine)
- equateLoc(buf41,eInvert,atCursor) .. mark end
- freeBuf(buf49)
- insertRgn(buf49,eFile,buf41,invert) .. copy item to buf49
- clearRgn(buf41,invert) .. erase from buf41
- insertRgn(buf54,eFile,buf49,all) .. add it to buf54
- moveCursor(buf41,eFile) .. search bkwd for dups
- setSearch(buf49)
- while (search(buf41,sInvert,eInvert,-1)) clearRgn(buf41,invert).. del dup
- goto label(10) .. get next item, unless buf41 empty now.
- label(11)
- freeBuf(buf41) .. starting over
- insertRgn(buf41,eFile,buf54,all) .. store no-dup list in buf41
- freeBuf(buf54) .. erase old list in buf54
- label(1) .. NOTE: should have used swapBuf instead
- moveCursor(buf41,sFile)
- while (is(buf41,whiteSpace)) clearChar(buf41) .. clear lead white space
- if (is(buf41,eFile)) { .. buf41 empty, must be finished
- swapBuf(buf54,buf41) .. index was in buf54
- freeBuf(buf54)
- setFileName(buf41,"Index")
- equateLoc(buf41,sPage,sFile)
- equateLoc(buf41,atCursor,sFile)
- putMsg("Press ctl-w to see Index") .. finished
- return
- }
- freeBuf(buf49)
- insertRgn(buf49,sFile,buf41,line) .. load search string with item.
- clearRgn(buf41,line) .. erase the item
- putMsg(buf49) .. show the item
- moveCursor(buf54,eFile) .. put item at end of index building
- insertRgn(buf54,eFile,buf49,all)
- insertRgn(buf54,eFile," ",all) .. space before page #s that go in
- insertChar(buf54,eLine)
- moveCursor(buf54,sChar)
- equateNum(n53,0) .. so know if need comma
- moveCursor(curFile,sFile)
- label(2)
- setSearch(buf49)
- while (search(curFile,sInvert,eInvert,1)) {
- moveCursor(curFile,sChar)
- if (is(curFile,alpha)) {
- label(3) .. part of a bigger word so ignore
- moveCursor(curFile,eInvert)
- goto label(2) .. and resume search
- }
- if (is(curFile,digit)) goto label(3) .. part of bigger word, ignore
- moveCursor(curFile,eInvert)
- if (is(curFile,alpha)
- | is(curFile,digit)) goto label(2).. part of bigger word, ignore
- getPageRowCol(n54,n50,n49) .. this uses display
- moveCursor(curFile,eForm) .. don't search again on this page
- if (!eqNum(n53,0)) insertChar(buf54,",") .. put comma if not 1st #
- toWord(buf54,n54) .. install the page # after index item
- equateNum(n53,n54) .. so will put in comma next time for sure
- }
- goto label(1) .. get next item from buf41
- >
-
- Toggle the "make icons" flag. When "on", Workbench icons are created
- <altCtl-i: flipFlag(curFile,icons)>
-
- Enter idle-timer value (tenths of sec) after which idle command executed
- <shftAltCtl-i:
- putMsg("Input idle time (tenths of a second)")
- if (inputNum(n54)) equateNum(idleTime,n54)>
-
- Toggle the right-justify typing mode
- <alt-j: flipFlag(curFile,rightJustify) >
-
- Join next line to cursor line
- <ctl-j:
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- clearChar(curFile)
- while (is(curFile,space) | is(curFile,9)) clearChar(curFile)
- insertChar(curFile," ") >
-
- Move the hilite to the left by one character (space or tab)
- <alt-l:
- moveCursor(curFile,sHilite)
- if (!is(curFile,sLine)) moveCursor(curFile,sLine)
- label(1)
- if (is(curFile,space) | is(curFile,9)) clearChar(curFile)
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- moveCursor(curFile,eChar) .. start of next line
- if (gtLoc(curFile,eHilite,atCursor)) goto label(1) >
-
- Convert the character under the cursor to lower case and move cursor fwd
- <ctl-l:
- toLower(curFile)
- moveCursor(curFile,eChar) >
-
- Set bottom margin
- <lAmiga-l:
- putMsg("Input bottom margin lines (0-200):")
- if (inputNum(n54)) equateNum(bottomMargin,n54)
- setLocal(curFile,bottomMargin,bottomMargin)>
-
- Set command multiplier to use for next command
- <ctl-m: putMsg("Input command multiplier:") inputNum(cmdMultiplier) >
-
- Swap the mouse's button-Up operation with the next key-command pressed
- <alt-m:
- putMsg("Will swap mouse buttonUp with your next input:")
- getKey(n53)
- if (swapKey(n53,normal-buttonUp)) {
- putMsg("Swapped - to undo, do it again")
- return
- }
- putMsg(" ") >
-
- Map illegal ASCII (0 thru 5) characters into safe ones. (See top of Config!)
- <shftAlt-m: flipFlag(curFile,mapChars)>
-
- Rename the document in the window
- <alt-n:
- putMsg("Input new filename:")
- getFileName(buf43,curFile)
- if (inputString(buf43))
- setFileName(curFile,buf43) >
-
- Input a text line number to go to
- <ctl-n:
- putMsg("Input line number:")
- if (inputNum(n54)) {
- lineToLoc(curFile,atCursor,n54)
- vScroll(atCursor)
- } >
-
- Open the cursor line for typing
- <ctl-o:
- insertChar(curFile,eLine)
- moveCursor(curFile,sChar) >
-
- Move the hilite region to the right by one space
- <alt-r:
- moveCursor(curFile,sHilite)
- if (!is(curFile,sLine)) moveCursor(curFile,sLine)
- while (gtLoc(curFile,eHilite,atCursor)) {
- insertChar(curFile,32)
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- moveCursor(curFile,eChar)
- } >
-
- Terminate Learn Mode or run whatever is stored in learn-buffer. (See ctl-s.)
- <ctl-r: runLearn >
-
- Speak the hilite region
- <alt-s:
- if (gtLoc(curFile,eHilite,sHilite)) {
- freeBuf(buf50)
- insertRgn(buf50,eFile,curFile,hilite)
- speak(buf50)
- } >
-
- Start/abort Learn Mode. (Use ctl-r to finish & to run it.)
- <ctl-s:
- if (!getFlag(curFile,learnMode)) putMsg("LEARN MODE ACTIVE!")
- else putMsg("Learn Mode cancelled.")
- flipFlag(curFile,learnMode) >
-
- Line sort: sorts stacked list of words/phrases (removes duplicates).
- <shftAlt-s:
- movecursor(curfile,sfile)
- refreshdisplay
- runKey(lAmiga-t) .. convert tabs to spaces
- putMsg("Del trail white...")
- runKey(ctl-4) .. clear trailing white space
- moveCursor(curfile,sfile)
- putMsg("Del blank lines...")
- label(0)
- if (is(curfile,eline)) clearChar(curfile)
- else moveCursor(curfile,downLine)
- if (not is(curfile,efile)) goto label(0)
- movecursor(curfile,sfile)
- refreshdisplay
-
- putMsg("Sorting")
- .. count lines
- movecursor(curfile,sfile)
- equateNum(n54,0)
- while (moveCursor(curfile,downline)) incNum(n54)
- if (gtNum(2,n54)) returnFalse .. too few to sort
- equateNum(n53,n54) .. store MAX
-
- while (nothing) { .. while (gap >>= 1)
- div(n54,n54,2)
- if (eqNum(n54,0)) {
- moveCursor(curfile,sfile)
- refreshdisplay
- putMsg("Done")
- return
- }
- label(20)
- equateNum(n50,0) .. swapped = FALSE
- putMsg(n54) .. show gap size
- fileSize(curfile,n0)
-
- moveCursor(curfile,sfile) .. cursor at start of file
- refreshdisplay
- swapLoc(curfile,atcursor,loca)
- moveCursor(curfile,sfile)
- equateNum(n51,n54) .. put locA 1 gap distance from sof
- while (decNum(n51)) moveCursor(curfile,downline)
- swapLoc(curfile,atCursor,loca) .. now ready
-
- while (nothing) {
- clearRgn(buf48,all)
- clearRgn(buf49,all)
- insertRgn(buf48,efile,curfile,line) .. copy cursor line
- swapLoc(curfile,atcursor,loca)
- insertRgn(buf49,efile,curfile,line) .. copy locA line
- swapLoc(curfile,atcursor,loca)
- if (isEmpty(buf49) | isEmpty(buf48)) goto label(21)
- if (stringComp(n49,buf49,buf48,1)) { .. delete duplicate
- if (stringComp(n49,buf49,buf48,0)) { .. true dup?
- clearRgn(curfile,line)
- clearChar(curfile)
- equateNum(n50,1) .. swapped = TRUE, force a rerun
- moveCursor(curfile,sline)
- putMsg(buf48)
- }
- } else if (gtNum(0,n49)) { .. not alpha order, swap them
- clearRgn(curfile,line)
- insertRgn(curfile,atcursor,buf49,all)
- moveCursor(curfile,sLine) .. start of this line
- swapLoc(curfile,atcursor,loca)
- clearRgn(curfile,line)
- insertRgn(curfile,atcursor,buf48,all)
- moveCursor(curfile,sLine) .. start of this line
- swapLoc(curfile,atcursor,loca)
- equateNum(n50,1) .. swapped = TRUE
- putMsg(buf48)
- }
- moveCursor(curfile,eLine)
- moveCursor(curfile,eChar)
- swapLoc(curfile,atcursor,loca)
- moveCursor(curfile,eLine)
- moveCursor(curfile,eChar)
- swapLoc(curfile,atcursor,loca)
- }
- label(21)
- if (eqNum(n50,1)) goto label(20) .. got swaps, go again
- }
-
- >
-
- Show key-help message on next key pressed. Copy key-help to RAM: on first
- <ctl-t:
- putMsg("Input a key, gadget, click etc to get Help msg")
- getKey(n54)
- teachOne(n54)>
-
- Toggle between using printable keys for commands or for normal typing input
- <alt-u: flipFlag(curFile,useKeys)>
-
- Load UStar config
- <virtual-u:
- if (!loadConfig("UstarData!")) loadConfig("S:UstarData!") >
-
- Convert char under cursor to upper case
- <ctl-u:
- toUpper(curFile)
- moveCursor(curFile,eChar) >
-
- Set left margin
- <lAmiga-m:
- putMsg("Input left margin column (0-200):")
- if (inputNum(n54)) equateNum(leftMargin,n54)
- setLocal(curFile,leftMargin,leftMargin)>
-
- Set top margin
- <lAmiga-u:
- putMsg("Input top margin lines (0-200):")
- if (inputNum(n54)) equateNum(topMargin,n54)
- setLocal(curFile,topMargin,topMargin)>
-
- Switch flag that makes CTRL chars vis/invis
- <ctl-v: flipFlag(curFile,spooks) refreshDisplay >
-
- Swap the current document in window with buffer 41
- <ctl-w: swapBuf(curFile,buf41) >
-
- Swap current buffer to buffer 0 (the "home" buffer of Uedit)
- <alt-w:
- swapBuf(buf0,curFile)
- editBuf(buf0) >
-
- For programmers: Toggle number under cursor between hex/decimal
- <ctl-x: hexDecimal(curFile) >
-
- Execute an AmigaDOS command, but don't collect the results
- <ctl-y:
- putMsg("Enter AmigaDOS command")
- freeBuf(buf40)
- if (inputString(buf40)) execute(" ",buf40) >
-
- Execute an AmigaDOS command and show the results
- <ctl-z:
- putMsg("Enter AmigaDOS command")
- freeBuf(buf40)
- freeBuf(buf39)
- if (!inputString(buf40) | !execute(buf39,buf40)) returnFalse
- if (!isEmpty(buf39)) {
- putMsg("Result of AmigaDOS command:")
- downFlag(buf39,changed)
- editBuf(buf39)
- vscroll(sFile)
- updateDisplay
- return
- }
- putMsg("No reply from AmigaDOS.")
- freeBuf(buf39) >
-
- Search for buf53 dirname in buf38. Add name to list if not there.
- <virtual-7:
- moveCursor(buf53,eFile)
- decLoc(buf53,atCursor)
- if (!is(buf53,"/") & !is(buf53,":")) insertRgn(buf53,eFile,"/",all)
- if (isEmpty(buf38)) runKey(virtual-8) .. default dir names
- .. if (isEmpty(buf38)) goto label(0)
- moveCursor(buf38,sFile)
- equateLoc(buf38,eHilite,sHilite)
- label(1)
- while (is(buf38,whiteSpace)) moveCursor(buf38,eChar)
- if (is(buf38,eFile)) goto label(0) .. add it
- equateLoc(buf38,sHilite,atCursor) .. store start
- while (!is(buf38,whiteSpace) & !is(buf38,eFile))
- moveCursor(buf38,eChar)
- equateLoc(buf38,eHilite,atCursor) .. store end
- freeBuf(buf52)
- insertRgn(buf52,sFile,buf38,hilite)
- if (!stringComp(n54,buf53,buf52,1)) goto label(1) .. try again
- moveCursor(buf38,sHilite) .. found dirname. Put cursor at start
- goto label(5)
- label(0) .. dirname not found. Add it
- moveCursor(buf38,eFile)
- if (!isEmpty(buf53)) {
- locToCol(buf38,n54,atCursor)
- if (gtNum(n54,60)) insertChar(buf38,eLine)
- else insertChar(buf38,9) .. tab
- }
- equateLoc(buf38,sHilite,eFile)
- decLoc(buf38,sHilite)
- insertRgn(buf38,eFile,buf53,all) .. install new dirname as curdir
- equateLoc(buf38,eHilite,eFile)
- incLoc(buf38,sHilite)
- moveCursor(buf38,sHilite)
- equateNum(n54,curFile)
- label(5)
- freeBuf(buf53)
- if (!eqNum(n54,38) & gotoSplit(buf38)) gotoSplit(buf[n54])..force refresh
- runKey(virtual-9)
- >
-
- Load beginning directory names into buf38
- <virtual-8:
- if (isEmpty(buf38)) {
- if (!insertFile(buf38,eFile,"S:Directories"))
- insertRgn(buf38,eFile," DF0: DF1: DH0: S: RAM: VD0:",all)
- moveCursor(buf38,eFile)
- equateLoc(buf38,sHilite,eHilite)
- equateLoc(buf38,mouseLoc,eFile)
- }
- equateLoc(buf38,sPage,sFile) >
-
- Put up msg telling what click-loading directory now is.
- <virtual-9:
- freeBuf(buf53)
- insertRgn(buf53,eFile,"Click-loading directory = ",all)
- if (gtLoc(buf38,eHilite,sHilite)) insertRgn(buf53,eFile,buf38,hilite)
- else insertRgn(buf53,eFile,"default",all)
- putMsg(buf53)
- freebuf(buf53) >
-
- Get listing. (Also sets directoryname used in ctl-buttonDown.)
- <alt-z:
- putMsg("Enter directory: ")
- freeBuf(buf53)
- if (inputString(buf53)) runKey(virtual-7)
- freeBuf(buf54)
- insertRgn(buf54,eFile,"Dir ",all)
- insertRgn(buf54,eFile,buf38,hilite)
- if (!execute(buf39,buf54)) returnFalse
- moveCursor(buf39,sFile)
- insertChar(buf39,eLine)
- insertRgn(buf39,sFile,buf38,hilite)
- newFile
- swapBuf(buf39,curFile)
- freeBuf(buf39)
- vScroll(sFile)
- putMsg("To load files, ctrl-click names with mouse.")
- setFileName(curFile,buf54)
- flipFlag(curFile,changed) >
-
- Change the current working directory
- <altCtl-z:
- putMsg("Change current directory to (may not work in Workbench):")
- freeBuf(buf53)
- if (inputString(buf53)) changeDir(buf53) >
-
- Clear leading white space in cursor line
- <alt-1:
- equateLoc(curFile,locA,atCursor)
- if (!is(curFile,sLine)) moveCursor(curFile,sLine)
- while (is(curFile,whiteSpace) & !is(curFile,eLine) & !is(curFile,12))
- clearChar(curFile)
- equateLoc(curFile,atCursor,locA) >
-
- Center text in the line. (Uses current line length.)
- <alt-2:
- runKey(alt-1) .. clear leading white space
- if (is(curFile,blankLine)) returnFalse
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- locToCol(curFile,n53,atCursor)
- getLocal(curFile,n54,lineLength)
- if (gtNum(n54,n53)) {
- moveCursor(curFile,sLine)
- incNum(n54)
- sub(n53,n54,n53)
- div(n53,n53,2)
- do (n54,1,n53) insertChar(curFile," ")
- } >
-
- Match indent of cursor line to previous line
- <alt-4:
- equateNum(n54,0)
- moveCursor(curFile,upLine)
- if (!getFlag(curFile,autoIndent)) {
- flipFlag(curFile,autoIndent)
- equateNum(n54,1)
- }
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- clearChar(curFile)
- typeChar(eLine)
- if (eqNum(n54,1)) flipFlag(curFile,autoIndent)
- moveCursor(curFile,downLine) >
-
- Right-align the cursor line from cursor rightward
- <alt-5:
- if (!is(curFile,whiteSpace)) moveCursor(curFile,sChar)
- if (is(curFile,eLine)) return
- while (is(curFile,whiteSpace) & !is(curFile,sLine)) {
- clearChar(curFile)
- moveCursor(curFile,sChar)
- }
- moveCursor(curFile,eChar)
- equateLoc(curFile,locA,atCursor)
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- locToCol(curFile,n54,atCursor)
- decNum(n54)
- getLocal(curFile,n53,lineLength)
- sub(n54,n53,n54)
- moveCursor(curFile,locA)
- if (gtNum(n54,0)) while (decNum(n54)) insertChar(curFile," ") >
-
- Show the value of a number variable
- <alt-8:
- putMsg("n-variable #: ")
- inputNum(n54)
- freeBuf(buf54)
- insertChar(buf54,"n")
- toWord(buf54,n54)
- insertRgn(buf54,eFile," is ",all)
- toWord(buf54,n[n54])
- putMsg(buf54) >
-
- Set the value of a number variable
- <alt-9:
- putMsg("Set n-variable #:")
- inputNum(n54)
- putMsg("To value:")
- inputNum(n[n54])>
-
- Show the ASCII value of the character under the cursor
- <ctl-/:
- copyChar(curFile,n54)
- freeBuf(buf54)
- toWord(buf54,n54)
- insertRgn(buf54,sFile,"Character value under cursor was ",all)
- putMsg(buf54)
- moveCursor(curFile,eChar) >
-
- Show the current document size
- <ctl-1:
- fileSize(curFile,n54)
- freeBuf(buf54)
- insertRgn(buf54,sFile,"File size in bytes: ",all)
- toWord(buf54,n54)
- putMsg(buf54)>
-
- Switch displaying of cursor row-column off/on
- <ctl-2: flipFlag(curFile,rowCol) >
-
- This is a simple reformat cmd that doesn't refmt indented paragraphs.
- .. <ctl-3: if (reformat) moveCursor(curFile,downLine) >
-
- Reformat cursor paragraph, starting at cursor line
- <ctl-3: .. move down, if blank line, to find par beginning.
- while (is(curFile,blankLine)) {
- moveCursor(curFile,downLine)
- if (!is(curFile,eLine)) moveCursor(curFile,eLine)
- if (is(curFile,eFile)) returnFalse
- }
- equateNum(n3,0) .. a flag used below
- equateLoc(curFile,locA,atCursor) .. store par beginning
- label(2) .. get indent of 1st par line
- if (!is(curFile,sLine)) moveCursor(curFile,sLine)
- while (is(curFile,whiteSpace)) moveCursor(curFile,eChar)
- locToCol(curFile,n0,atCursor) .. get the 1st line's indent
-
- if (eqNum(n3,0)) { .. if doing FIRST line
- equateNum(n1,n0) .. store indent of 1st par line
- equateNum(n3,1) .. set a flag so won't come back here
- equateLoc(curFile,locB,atCursor) .. store 1st text location
- moveCursor(curFile,downLine) .. move to 2nd line
- if (is(curFile,blankLine)) { .. no second line
- equateNum(n0,1)
- goto label(3)
- }
- goto label(2) .. go back and get indent of 2nd par line
- }
- label(3)
- moveCursor(curFile,upLine) .. move back to 1st line
- equateNum(n2,n0) .. store indent of 2nd line
-
- if (eqNum(n2,-1) | geNum(n2,n1)) { .. was no 2nd line or
- reformat .. 2nd line inset, so do only 1st line
- goto label(5) .. finished
- } else { .. 2nd line has less or equal indent
- sub(n1,n1,n2) .. par indent = 1st indent minus 2nd
- colToLoc(curFile,atCursor,n2)
- equateLoc(curFile,locA,atCursor)
- clearRgn(curFile,loc) .. wiping out extra 1st line indent
- do (n54,1,n1) insertChar(curFile,"x") .. repl with x's
- moveCursor(curFile,sWord) .. made a FAKE WORD
- equateLoc(curFile,locA,atCursor) .. store its loc
- reformat .. now paragrah has SAME indent
- equateLoc(curFile,locB,atCursor) .. store end of par
- moveCursor(curFile,locA) .. go back to fake word
- while (is(curFile,"x")) { .. swap x's for spaces
- swapChar(curFile," ")
- moveCursor(curFile,eChar)
- } .. now fake word is gone
- equateLoc(curFile,atCursor,locB) .. goto end of par
- label(5)
- moveCursor(curFile,downLine) .. leave paragraph
- }
- >
-
- Delete all trailing white-space in current document
- <ctl-4:
- equateLoc(curFile,locA,atCursor)
- moveCursor(curFile,sFile)
- while (nothing) {
- if (is(curFile,eFile))
- { equateLoc(curFile,atCursor,locA) return }
- moveCursor(curFile,eLine)
- moveCursor(curFile,sChar)
- while (is(curFile,space) | is(curFile,9))
- { clearChar(curFile) moveCursor(curFile,sChar) }
- moveCursor(curFile,eLine)
- } >
-
- Save a learn-sequence to disk, saving it under a Name
- <ctl-5:
- putMsg("Save learn seq under what Name?")
- freeBuf(buf54)
- if (inputString(buf54) & !saveLearn(buf54))
- putMsg("Couldn't save") >
-
- Load a learn-sequence stored on disk
- <ctl-6:
- putMsg("Load what learn seq Name?")
- freeBuf(buf54)
- if (inputString(buf54) & !loadLearn(buf54))
- putMsg("Not found") >
-
- Load and run learn-sequence stored on disk
- <ctl-7:
- putMsg("Load & run what learn seq Name?")
- freeBuf(buf54)
- if (inputString(buf54) & loadLearn(buf54)) runLearn
- else putMsg("Not found") >
-
- Toggle case-sensitivity of search
- <ctl-8: flipFlag(curFile,searchCaps) >
-
- *** arithmetic commands ***
-
- Set running arithmetic total to zero
- <ctl-0: equateNum(n49,0) >
-
- Type the running arithmetic total into text at cursor
- <ctl-\:
- freeBuf(buf54)
- div(n52,n49,100)
- if (gtNum(0,n49)) if (eqNum(n52,0)) insertChar(buf54,"-")
- toWord(buf54,n52)
- insertChar(buf54,".")
- if (gtNum(0,n49)) mul(n52,n49,-1)
- else equateNum(n52,n49)
- mod(n52,n52,100)
- if (gtNum(10,n52)) insertChar(buf54,"0")
- toWord(buf54,n52)
- insertRgn(curFile,atCursor,buf54,all)
- insertRgn(buf54,sFile,"Inserted total into text ",all)
- putMsg(buf54) >
-
- Add the next word (if a number) to arithmetic total & display total
- <ctl-=:
- moveCursor(curFile,eWord)
- moveCursor(curFile,sWord)
- if (!is(curFile,digit)) returnFalse
- toNumber(n54,curFile)
- moveCursor(curFile,eWord)
- if (is(curFile,".")) {
- moveCursor(curFile,eChar)
- if (!is(curFile,digit)) goto label(1)
- toNumber(n53,curFile)
- moveCursor(curFile,eChar)
- if (!is(curFile,digit)) {
- mul(n53,n53,10)
- moveCursor(curFile,sChar)
- }
- moveCursor(curFile,eWord)
- } else { label(1) equateNum(n53,0) }
- mul(n54,n54,100)
- if (gtNum(0,n54)) mul(n52,n53,-1)
- else equateNum(n52,n53)
- add(n54,n54,n52)
- add(n49,n49,n54)
- freeBuf(buf54)
- div(n52,n49,100)
- if (gtNum(0,n49) & eqNum(n52,0)) insertChar(buf54,"-")
- toWord(buf54,n52)
- insertChar(buf54,".")
- mod(n52,n49,100)
- if (gtNum(0,n49)) mul(n52,-1,n52)
- if (gtNum(10,n52)) insertChar(buf54,"0")
- toWord(buf54,n52)
- insertRgn(buf54,sFile,"Running total is ",all)
- putMsg(buf54) >
-
- Subtract the next word (if a number) from arithmetic total & display total
- <ctl--:
- moveCursor(curFile,eWord)
- moveCursor(curFile,sWord)
- if (!is(curFile,digit)) returnFalse
- toNumber(n54,curFile)
- moveCursor(curFile,eWord)
- if (is(curFile,".")) {
- moveCursor(curFile,eChar)
- if (!is(curFile,digit)) goto label(1)
- toNumber(n53,curFile)
- moveCursor(curFile,eChar)
- if (!is(curFile,digit)) {
- mul(n53,n53,10)
- moveCursor(curFile,sChar)
- }
- moveCursor(curFile,eWord)
- } else {
- label(1)
- equateNum(n53,0)
- }
- mul(n54,n54,100)
- if (gtNum(0,n54)) mul(n52,n53,-1)
- else equateNum(n52,n53)
- add(n54,n54,n52)
- sub(n49,n49,n54)
- freeBuf(buf54)
- div(n52,n49,100)
- if (gtNum(0,n49) & eqNum(n52,0)) insertChar(buf54,"-")
- if (gtNum(0,n49)) insertChar(buf54,"-")
- toWord(buf54,n52)
- insertChar(buf54,".")
- mod(n52,n49,100)
- if (gtNum(0,n52)) mul(n52,n52,-1)
- if (gtNum(10,n52)) insertChar(buf54,"0")
- toWord(buf54,n52)
- insertRgn(buf54,sFile,"Running total is ",all)
- putMsg(buf54) >
-
- *** columnar data ***
-
- Put up msg saying turn ON columnar if it is OFF.
- <virtual-`:
- if (!getFlag(curFile,columnar)) {
- alertUser("Turn ON columnar display mode first. (See Columnar menu.)")
- abort
- } >
-
- Toggle between columnar display and regular hilite/invert display mode
- <shftCtl-`:
- flipFlag(curFile,columnar)
- refreshDisplay >
-
- Copy and then clear the hilited columnar data
- <shftCtl-1:
- runKey(virtual-`)
- freeBuf(buf37)
- copyColData(buf37,sFile,curFile,hilite,1)
- clearColData(curFile,hilite,0) >
-
- Space-fill the hilited columnar data, overlaying the original text. No copy
- <shftCtl-2:
- runKey(virtual-`)
- clearColData(curFile,hilite,1) >
-
- Copy the hilited columnar data into a buffer
- <shftCtl-3:
- runKey(virtual-`)
- if (geLoc(curFile,sHilite,eHilite)) returnFalse
- freeBuf(buf37) copyColData(buf37,sFile,curFile,hilite,1)>
-
- Insert copied columnar data at the cursor
- <shftCtl-4:
- runKey(virtual-`)
- copyColData(curFile,atCursor,buf37,all,1)>
-
- Overlay copied columnar data onto existing text at the cursor
- <shftCtl-5:
- runKey(virtual-`)
- copyColData(curFile,atCursor,buf37,all,0)>
-
- Insert the columnar hilite region at the cursor. (No intermediate copy.)
- <shftCtl-6:
- runKey(virtual-`)
- copyColData(curFile,atCursor,curFile,hilite,1)>
-
- Overlay the columnar hilite region onto existing text at the cursor
- <shftCtl-7:
- runKey(virtual-`)
- copyColData(curFile,atCursor,curFile,hilite,0)>
-
- *** interlace mode ***
-
- Switch to/from interlace display mode
- <shft-esc: flipFlag(curFile,lace)>
-
- Switch to regular screen, 1 bitplane
- <rAmiga-f1: setLocal(curfile, lace, 1) >
-
- Switch to regular screen, 2 bitplanes
- <rAmiga-f2: setLocal(curfile, lace, 0) >
-
- Switch to lace screen, 1 bitplane
- <rAmiga-f3: setLocal(curfile, lace, 3) >
-
- Switch to lace screen, 2 bitplanes
- <rAmiga-f4: setLocal(curfile, lace, 2) >
-
- Tune the RGB colors in interlace using mouse. (See alt-Help also.)
- <alt-esc: laceColor>
-
- Toggle scroll type in range 0-2
- <rAmiga-s:
- toggle(scrollType)
- putMsg(scrollType) >
-
- Toggle hide-display off/on
- <rAmiga-h:
- toggle(hideDisplay)
- putMsg(hideDisplay) >
-
- Assign a name to one of the 4 gadgets (1-4)
- <ctl-esc:
- putMsg("Enter gadget number (1-4):")
- if (!inputNum(n54) | gtNum(n54,4) | gtNum(1,n54)) returnFalse
- putMsg("Enter gadget name (one Space to clear):")
- freeBuf(buf54)
- inputString(buf54)
- if (!isEmpty(buf54)) {
- gadgetName(n54,buf54)
- putMsg(" ")
- } >
-
- Uedit's About... msg
- <shftAltCtl-a:
- updateDisplay
- getFilename(buf54,curfile)
- setFileName(curFile," About Uedit...")
- text(" ",0,0,0,-2) .. -2 clear screen using color 0
- text("UEDIT",3,36,7,0)
- text("(for AMIGA & PC)",4,30,0,0)
- text("(C) 1986-90 by Rick Stiles. All rights reserved.",6,13,0,0)
- text("P.O. Box 666,",7,22,-1,0)
- text(" Washington, IN 47501",-1,-1,-1,0)
- text(" Uedit is a SHAREWARE programmable text editor for the",9,10,0,0)
- text(" technical user. See Uedit-Tutorial for general info",10,10,-1,0)
- text(" and instructions. Try Uedit and see how you like it.",11,10,-1,0)
- text(" If you USE it, become a REGISTERED USER by ordering",12,10,-1,0)
- text(" the unlimited version. ",13,10,-1,0)
- text(" (See Uedit-Policy for price & registering info.)",15,10,0,0)
- getserialnum(n54)
- text("s/n ",16,33,7,0)
- text(n54,-1,-1,-1,0)
-
- do(n54,8,67) text(" ",1,n54,2,1)
- do(n54,2,17) text(" ",n54,67,-1,1)
- equateNum(n54,67)
- while (!eqNum(n54,8)) {
- text(" ",17,n54,-1,1)
- decNum(n54)
- }
- equateNum(n54,17)
- while (!eqNum(n54,1)) {
- text(" ",n54,8,-1,1)
- decNum(n54)
- }
- getKeyVal(n53,n53)
- setFileName(curFile,buf54)
- text(" ",0,0,0,-2) .. -2 clear screen in normalVid
- putmsg(" ")
- putmsg(" ")
- refreshDisplay >
-
- *****
-
- Assign new Primitive Mode terminator Ctrl-key
- <normal-esc:
- putMsg("Enter new Primitive Mode terminator CTRL-key (pmESC)")
- if (getChar(n54) & gtNum(32,n54)) equateNum(pmESC,n54)
- putMsg(" ") >
-
- Save changed files during idle periods, if their idle-save flag is set
- <idle:
- getMaxFiles(n52)
- decNum(n52)
- do (n54,0,n52) if (!inputWaiting & getflag(buf[n54],changed)
- & getflag(buf[n54],userLocalA)) saveFile(buf[n54]) >
-
- *** end of Config!M ***
-
-