home *** CD-ROM | disk | FTP | other *** search
- /*
- * PULL-DOWN menu setup demo for the Octopus Bulletin Board System
- * written by Koos Kuil on 18 May 1996
- * -------------------------------------------------------------------
- * Run this script using: OCTOPUS -sPULLDEMO.SCR local
- *
- * This example is written in ONE .SCR file so please split it into
- * several parts if you want to make use of it.
- *
- * IMPORTANT: In Octopus v0.72alpha-6 it's required that the menu
- * library (beginning with #menulib) is put at the begin
- * of the script file. This will be more flexible later.
- */
-
- /* -------------------------------------------------------------------
- * Menu library for Pull-down menus, the #define MenuBarKeys is used
- * in combination with all enddo... commands what makes it a lot
- * easyer to handle this keys and avoid mistakes. (Since v0.72a6
- * this method is possible)
- */
- #define MenuBarKeys "*MQFSTB CursLeft CursRight"
-
- /* -------------------------------------------------------------------
- * Here does begin out menu library, it should end with the #endlib
- * statement, the empty line after each menu is important and does
- * indicate Octopus that the end of a menu is reached.
- */
- #menulib
-
- Title [*]Main
- Entry [A]About Octopus
- Entry [I]What time is it?
- Entry [U]List of users
- Entry [Y]Yell the Sysop
- Entry [P]Upload to Path
- Entry [!]Quick Logoff
-
- Title [M]Msgbase
- Entry MsgGroups[G]Msg Group
- Entry [R]Echo rules
- Entry [N]Scan new mail
- Entry [!] Quick Logoff
-
- SubMenu MsgGroups
- Entry [1]Local mail
- Entry [2]NeST
- Entry [3]German
- Entry [4]AtariNet
- Entry [5]Fan mail
-
- Title [Q]QWK
- Entry [1]Change NDX files
- Entry [2]ChangeQwkBulletins
- Entry [3]ResetLastread
- Entry [4]UnmarkQwkAreas
- Entry [5]SetQwkMaxMsgs
- Entry [6]All msgs/one area
- Entry [7]All msgs/marked
- Entry [8]New msgs/one area
- Entry [9]New msgs/marked
- Entry [0]New msgs/marked/days
- Entry [A]Mark msg areas
- Entry [U]Upload reply's
- Entry [H]Help about QWK
-
- Title [F]File
- Entry FileGroups[G]File Group
- Entry [L]List files
- Entry [N]New files
- Entry [K]Keyword search
- Entry [D]Download
- Entry [V]Verbose list
- Entry [U]Upload files
- Entry [A]Statistics
- Entry [P]Private upload
- Entry [!]Quick Logoff
-
- SubMenu FileGroups
- Entry [1]ATARI
- Entry [2]GENERAL
- Entry [3]FANFILES
- Entry [4]NESTFILES
- Entry [X]All groups
-
- Title [S]Statistics
- Entry [1]Last 15 Callers
- Entry [2]Best 15 Downloaders
- Entry [3]Best 10 Email writ.
- Entry [4]Happy Birthday!
- Entry [5]Your own status
- Entry [6]Best 10 Netmail wrt.
- Entry [7]Filebase statistics
- Entry [8]Best 15 Callers
- Entry [9]Best 15 Uploaders
- Entry [!]Quick Logoff
-
- Title [T]Settings
- Entry [E]Screen Emulation
- Entry [H]Toggle Hotkeys
- Entry [O]Toggle moreprompt
- Entry [I]Toggle IBM graphics
- Entry [P]Change password
- Entry [L]New Screen-length
- Entry [W]New Screen-width
- Entry [R]Other date-format
- Entry [U]Def. Upload protocol
- Entry [D]Def. Download protocol
- Entry [A]Def. Archiver
- Entry [!]Quick Logoff
-
- Title [B]Bulletins
- Entry [1]Atari Explorer
- Entry [2]Z-NET
- Entry [3]A-TOS (German)
- Entry [4]Dutch Net News
- Entry [5]Fido-News
- Entry [!]Quick Logoff
-
- #endlib
-
- /* -------------------------------------------------------------------
- * MAIN startup function, the normal script file begins here...
- * a little bit stripped but usable enough.
- */
- Main
- SenseTerminal /* Detect if remote supports ANSI */
- Login /* Login, no luxe or other things */
- IfNoAccess /* Drop the user if no access */
- Logout
- Endif
- DoMailScan Full /* Do a little mailscan :-)) */
-
- Gosub draw_bbsinfo
-
- /* -------------------------------------------------------------------
- * Begin of the "MAIN MENU"
- */
- :mainmenu
- Do
- DrawMenu Main Gosub draw_ascii_msg
- DoMenu Main
- Selectchoice
- Case A Convert InfoTxt
- Case I Convert Timedemo
- Case U UserList
- Case Y PageSysop
- Case P UploadToPath C:\PRIVE\
- Case ! Gosub logoff
-
- /* The Common statement does clear the screen when we
- * are NOT in ascii mode and rebuild the information on
- * it. It's like default but only activated when a choice
- * is done in one if above Case statements.
- */
- Common Gosub draw_bbsinfo
- EndSelect
- Enddochoice MenuBarKeys
- RemoveMenu Main
- Enddo MenuBarKeys
-
- /* Check to what menu we should go */
- IfChoice CursLeft
- Goto bulletin
- Else IfChoice CursRight
- Goto msgbase
- Else
- Goto choice_action
- Endif
- Endif
- End /* End Octopus */
-
- /* -------------------------------------------------------------------
- * Begin of the "STATISTICS MENU"
- */
- :statistics
- Do
- DrawMenu Statistics Gosub draw_ascii_msg
- DoMenu Statistics
- SelectChoice
- Case 1 ListLastCallers
- Case 2 Convert 15_dnlds
- Case 3 Convert 10_email
- Case 4 Convert Birthday
- Case 5 Convert Status
- Case 6 Convert 10_nmail
- Case 7 FileBaseStatistics
- Case 8 Convert 15_calls
- Case 9 Convert 15_uplds
- Case ! Gosub logoff
- Common Gosub draw_bbsinfo
- EndSelect
- EnddoChoice MenuBarKeys
- RemoveMenu Statistics
- Enddo MenuBarKeys
-
- IfChoice CursLeft
- Goto filebase
- Else IfChoice CursRight
- Goto settings
- Else
- Goto choice_action
- Endif
- Endif
- End /* End Octopus */
-
- /* -------------------------------------------------------------------
- * Begin of the "USER SETTINGS"
- */
- :settings
- Do
- DrawMenu Settings Gosub draw_ascii_msg
- DoMenu Settings
- Selectchoice
- Case E ChangeEmulation
- Case H Gosub toggle_hotkeys
- case I Gosub toggle_highascii
- Case O Gosub toggle_moreprompt
- Case P ChangePassword
- Case L ChangeScreenLength
- Case W ChangeScreenWidth
- Case F Gosub toggle_dateformat
- Case U GetDefaultUp N
- Case D GetDefaultDown N
- Case A GetDefaultArchiver N
- Case ! Gosub logoff
- Common Gosub draw_bbsinfo
- EndSelect
- EnddoChoice MenuBarKeys
- RemoveMenu Settings
- Enddo MenuBarKeys
-
- IfChoice CursLeft
- Goto statistics
- Else IfChoice CursRight
- Goto bulletin
- Else
- Goto choice_action
- Endif
- Endif
- End /* End Octopus */
-
- /* -------------------------------------------------------------------
- * Begin of the "BULLETIN MENU"
- */
- :bulletin
- Do
- DrawMenu Bulletins Gosub draw_ascii_msg
- DoMenu Bulletins
- Selectchoice
- Case 1 Bulletin 'aeo_????.txt'
- Case 2 Bulletin 'aeop????.???'
- Case 3 Bulletin 'slmp???.asc'
- Case 4 Bulletin 'stgd*.txt'
- Case 5 Bulletin 'str???.txt'
- Case 6 Bulletin 'znet*.*'
- Case ! Gosub logoff
- Common Gosub draw_bbsinfo
- EndSelect
- EnddoChoice MenuBarKeys
- RemoveMenu Bulletins
- Enddo MenuBarKeys
-
- IfChoice CursLeft
- Goto settings
- Else IfChoice CursRight
- Goto mainmenu
- Else
- Goto choice_action
- Endif
- Endif
- End /* End Octopus */
-
- /* -------------------------------------------------------------------
- * Begin of the "MSGBASE MENU", this menu does also have a small
- * SUB-MENU, take a very closed look at it how you can handle this
- * with less full screen redraws and to get the highest speed.
- */
- :msgbase
- Do
- DrawMenu Msgbase Gosub draw_ascii_msg
- DoMenu Msgbase
- Selectchoice
- Case N Cls DoMailScan Full
- Case R Bulletin echorule.txt
- Case ! Gosub logoff
- Common Gosub draw_bbsinfo
- Endselect
-
- /* For the message groups submenu the Case
- * will result in a full redraw so we do this
- * manually.
- */
- IfChoice G
- IfAscii EchoKey Endif
- DrawMenu MsgGroups Gosub draw_ascii_msg
- DoMenu MsgGroups
- Selectchoice
- Case 1 Do GetMsgAreaList FULL
- ReadMessages EnddoNoarea
-
- Case 2 Do GetMsgAreaList FULL
- ReadMessages EnddoNoarea
-
- Case 3 Do GetMsgAreaList FULL
- ReadMessages EnddoNoarea
-
- Case 4 Do GetMsgAreaList FULL
- ReadMessages EnddoNoarea
-
- Case 5 Do GetMsgAreaList FULL
- ReadMessages EnddoNoarea
-
- Common Gosub draw_bbsinfo
- DrawMenu Msgbase
- EndSelect
- EnddoChoice MenuBarKeys
-
- /* Remove the submenu */
- IfChoice CursLeft
- RemoveMenu MsgGroups
- ClrChoice
- Endif
-
- /* Don't loop again with the right cursor key */
- IfChoice CursRight
- RemoveMenu MsgGroups
- Endif
- Endif
- EnddoChoice MenuBarKeys
- RemoveMenu MsgBase
- Enddo MenuBarKeys
-
- IfChoice CursLeft
- Goto mainmenu
- Else IfChoice CursRight
- Goto qwkreader
- Else
- Goto choice_action
- Endif
- Endif
- End /* End Octopus */
-
- /* -------------------------------------------------------------------
- * Begin of the "QWKREADER MENU"
- */
- :qwkreader
- Do
- DrawMenu QWK Gosub draw_ascii_msg
- DoMenu QWK
- SelectChoice
- Case 1 ChangeQwkNdx
- Case 2 ChangeQwkBulletins
- Case 3 ResetLastread
- Case 4 UnmarkQwkAreas
- Case 5 SetQwkMaxMsgs
-
- Case 6 GetMsgAreaList FULL WriteQwkOneAll
- Case 7 WriteQwkMarkedAll
- Case 8 GetMsgAreaList FULL WriteQwkOneNew
- Case 9 WriteQwkMarkedNew
- Case 0 WriteQwkMarkedDays
-
- Case A MarkQwkAreas FULL
- Case U UploadQwkReplys GetKey
- Case H Bulletin qwkhelp
- Case ! Gosub 'logoff'
- Common Gosub draw_bbsinfo
- Endselect
- EnddoChoice MenuBarKeys
- RemoveMenu QWK
- Enddo MenuBarKeys
-
- IfChoice CursLeft
- Goto msgbase
- Else IfChoice CursRight
- Goto filebase
- Else
- Goto choice_action
- Endif
- Endif
- End /* End Octopus */
-
- /* -------------------------------------------------------------------
- * Begin of the "FILEBASE MENU", this menu does also have a small
- * SUB-MENU, take a very closed look at it how you can handle this
- * with less full screen redraws and to get the highest speed.
- */
- :filebase
- SetFileGroup FULL /* Set file group ATARI as default */
- SetMainArea FULL
- Do
- DrawMenu File Gosub draw_ascii_msg
- DoMenu File
-
- Selectchoice
- Case F FileListing
- Case L FileListing
- Case N Newfiles
- Case K KeywordSearch
- Case D Download
- Case V ShowFileInfo
- Case U Convert rules.upl UploadtoArea
- Case A FileBaseStatistics
- Case P Convert private.upl UploadPrivate
- Case ! Gosub logoff
- Common Gosub draw_bbsinfo
- Endselect
-
- /* For the message groups submenu the Case
- * will result in a full redraw so we do this
- * manually.
- */
- IfChoice G
- IfAscii EchoKey Endif
- DrawMenu FileGroups Gosub draw_ascii_msg
- DoMenu FileGroups
- Selectchoice
- Case 1 /* File group ATARI */
- Case 2 /* File group GENERAL */
- Case 3 /* File group FANFILES */
- Case 4 /* File group NESTFILE */
-
- Case X SetFileGroup FULL /* Set Full group */
- FileListing
-
- Common Gosub draw_bbsinfo
- DrawMenu File
- EndSelect
- EnddoChoice MenuBarKeys
-
- /* Remove the submenu */
- IfChoice CursLeft
- RemoveMenu FileGroups
- ClrChoice
- Endif
-
- /* Don't loop again with the right cursor key */
- IfChoice CursRight
- RemoveMenu FileGroups
- Endif
- Endif
- EnddoChoice MenuBarKeys
- RemoveMenu File
- Enddo MenuBarKeys
-
- IfChoice CursLeft
- Goto qwkreader
- Else IfChoice CursRight
- Goto statistics
- Else
- Goto choice_action
- Endif
- Endif
- End /* End Octopus */
-
- /* -------------------------------------------------------------------
- * Some USER-functions (normal in USERBASE.SCR)
- */
- :change_password
- ChangePassword
- Return
-
- :change_emulation
- ChangeEmulation
- Return
-
- :change_screenlength
- ChangeScreenLength
- Return
-
- :change_screenwidth
- ChangeScreenWidth
- Return
-
- :toggle_fullscred
- Send "\f*** Full Screen Message Editor ? ***\r\n\n"
- "@Y Yes, use the full screen edit (not in ascii mode).\r\n"
- "@N No, use the internal message line-orientated editor.\r\n\n"
- "Select: "
-
- AskYesNo
- IfAskTrue
- SetFullScrEd On
- Else
- SetFullScrEd Off
- Endif
- Return
-
- :toggle_moreprompt
- Send "\f*** Wait after each screen ? ***\r\n\n"
- "@Y Yes, enable more prompt\r\n"
- "@N No, disable more prompt\r\n\n"
- "Select: "
- AskYesNo
- IfAskTrue
- SetMorePrompt On
- Else
- SetMorePrompt Off
- Endif
- Return
-
- :toggle_hotkeys
- Send "\r\n\nDo you want to use fast menu hotkeys @c1(Y,n)@c0 ? "
- AskYesNo
- EchoYesNo
- IfAskTrue
- SetHotkeys On
- Else
- SetHotkeys Off
- Endif
- Return
-
- :toggle_dateformat
- Do
- Send "\r\n\nSelect your favourite date format.\r\n\n"
- "1. DD-MM-YYYY (26 September 1995)\r\n"
- "2. MM-DD-YYYY (September 26th 1995)\r\n\n"
- Send "Make your choice: "
- DoChoice
- Selectchoice
- Case 1 SetAltDateFormat Off
- Case 2 SetAltDateFormat On
- EndSelect
- EnddoChoice 12
- EchoKey
- Enddo 12
- Return
-
- :toggle_highascii
- Send "\r\n\nDo you want to use high ascii (IBM graphics) @c1(Y,n)@c0 ? "
- AskYesNo
- EchoYesNo
- IfAskTrue
- SetHighAscii On
- Else
- SetHighAscii Off
- Endif
- Return
-
- /* -------------------------------------------------------------------
- * Begin of the "LOGOFF normal menu"
- */
- :logoff
- Logout
- End
-
- /* When you see this piece of script, you'll think
- * why not using Select...EndSelect? No, this
- * will result in a nested loop and Octopus will
- * exit after this.
- *
- * Because we are directly jumping from one function
- * in another one, a Return command is not usable (this
- * will result in a "Return without gosub"). We use
- * the Goto command for this.
- */
- :choice_action /* Check choices */
- IfAscii
- IfChoice MenuBarKeys
- EchoKey
- Endif
- Endif
-
- IfChoice B Goto bulletin Endif
- IfChoice * Goto mainmenu Endif
- IfChoice F Goto filebase Endif
- IfChoice M Goto msgbase Endif
- IfChoice Q Goto qwkreader Endif
- IfChoice S Goto statistics Endif
- IfChoice T Goto settings Endif
-
- End
-
- /* This subroutine shows us how we can put a little
- * note at the end of our screen, be sure that you
- * don't have pulldown menus that does override this
- * text (on 14 May 1996 the screen rebuild is not
- * complete working).
- *
- * If you don't want it, put the "Cls" command after
- * the "Common" statements, this will give (as in this
- * function) only a clear-screen when required (when a
- * menu option was selected).
- *
- * For ascii mode this function is useless because it's
- * not possible in ascii to put text on the screen before
- * menu redraw is done.
- */
- :draw_bbsinfo
- IfNoAscii
- Cls
- Gotoxy 0,21
- Send " ----- You can put your own message text here for example on the -----\r\n"
- " ----- bottom of the screen, this text is not drawed in ascii mode -----"
-
- Gotoxy 0,19
- Send "/// You can use your cursor keys or menu title/entry keys to make a choice. ///"
- Endif
- Return
-
- /* Draw a little message when a menu is drawed on screen in
- * ascii mode, this subroutine should called AFTER a "DrawMenu"
- * command.
- */
- :draw_ascii_msg
- IfAscii
- Send "\r\n\nMake your choice `UF : "
- Endif
- Return
-
- /* End PULLDEMO.SCR */