• ingnatius 1-liner script

    From GRYPHON@46:1/116 to IGNATIUS on Thu Jan 31 19:20:17 2019
    I have that reworked script for you. I got it to work on my system, but I had to write my own ansi files in order to see what it's doinig.

    -----8<-------------------------------------
    // ignatius' oneliners

    uses cfg
    uses user

    var Twriters : array[1..10] of string
    var Toneliner : array[1..10] of string
    var S : string
    var Foneline : string
    var Ch : char
    var Ch2 : char
    var Count : byte
    var Count2 : byte


    //### begin show procedure ######################################

    Procedure show
    Begin
    clrscr
    dispFile('oneh.ans')
    For Count := 1 To 10 Do Begin
    write(' ')
    write(padRT(Toneliner[count], 64, ' '))
    write(' : ')
    writeln(padRT(Twriters[count], 10, ' '))
    End
    End // show
    //### end show procedure #########################################
    //### begin init procedure #########################################

    Procedure Init
    Var F1 : File
    Begin
    GetThisUser
    Foneline := cfgDataPath+'oneliner.lst'
    If Not fileExist(fOneLine) Then Begin
    fAssign(f1, Foneline, 66)
    fReWrite(f1)
    For count := 1 To 10 Do Begin
    fWriteLn(f1, 'Ia! Cthulhu!')
    fWriteLn(f1, 'ezdagor')
    End
    fClose(f1)
    End

    fAssign(f1, Foneline, 66)
    fReset(f1)
    If IoResult = 0 Then Begin
    For Count := 1 To 10 Do Begin
    fReadLn(f1, Toneliner[count])
    fReadLn(f1, Twriters[count])
    End
    fClose(f1)
    End
    End // Init

    //### begin bot_bar procedure ####################################

    Procedure bot_bar
    Begin
    dispFile('onen.ans')
    Ch2 := ReadKey
    If Ch2 = Chr(13) then Begin
    MenuCmd('go', 'main')
    Halt
    End
    End // bot_bar

    //### end bot_bar procedure ######################################
    //### begin top_bar procedure ####################################

    Procedure top_bar
    Var F1 : File
    Begin
    dispfile('oney.ans')
    Ch2 := ReadKey
    If Ch2 = Chr(13) then Begin
    dispFile('oneline.asc')
    Write(': ')
    s := stripmci(Input(70, 70, 11, ''))
    If s = '' then Begin
    WriteLn('aborted')
    Halt
    End

    For Count := 1 To 9 Do Begin
    Count2 := Count + 1
    Toneliner[count] := Toneliner[count2]
    Twriters[count] := Twriters[count2]
    End

    tWriters[10] := userAlias
    tOneliner[10] := S

    fAssign(f1, Foneline, 66)
    fReWrite(F1)
    For Count := 1 To 10 do Begin
    fWriteLn(f1, tOneliner[count])
    fWriteLn(f1, tWriters[count])
    End
    fClose(f1)
    End
    show
    End // top_bar

    //### end top_bar procedure ######################################
    //### begin position procedure ###################################

    Procedure position
    Begin
    Repeat
    dispFile('onen.ans')

    Ch := ReadKey
    If IsArrow and Ch = Chr(80) then begin
    dispfile('onen.ans')
    bot_bar
    End Else Begin
    If IsArrow and Ch = Chr(72) then begin
    top_bar
    End
    End

    Until Ch = Chr(13)
    End // position

    //### end position procedure ##########################################

    Begin
    Init
    Position
    End
    -----8<----------------------

    "No matter where you go, there you are!" - B. Bonzai

    --- Mystic BBS v1.10 A51 (Linux)
    * Origin: Cyberia BBS | Cyberia.Darktech.Org | Kingwood, TX (46:1/116)