home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac / paolin.zip / HELP / HELP2.SC < prev    next >
Text File  |  1993-05-18  |  5KB  |  153 lines

  1. ; ****************************************************************************
  2. ;       TITLE: HELP2.sc 
  3. ;     SESSION: PAOLINI - Providing Custom Help in Paradox 4 Apps
  4. ;   COPYRIGHT: (c) 1993 - Dan Paolini - DataStar International
  5. ; DESCRIPTION: Example of MENU-BASED Help
  6. ; ****************************************************************************
  7.  
  8. PROC Help!MainMenu.u()
  9. Private  h2, y2
  10.    DynArray y2[]
  11.       y2["Title"] = "This is the Title of Help Screen 2"
  12.       y2["HasFrame"] = False
  13.       y2["CanMove"] = False
  14.       y2["Style"] = 63
  15.  
  16.    Window Create Floating @ 2,3 Height 20 Width 74 Attributes y2 To h2
  17.    Window Select h2
  18.    SetCanvas h2
  19.    Canvas OFF
  20.    @ 1,1
  21.    Style Attribute 63
  22.    Frame Single From 0,0 To 19,73
  23.    SetMargin 1
  24. TEXT
  25.  
  26.    BEEP────┐
  27.            ├─1 Beep        Play One Beep and return to Menu
  28.            ├─2 Beeps       Play Two Beeps and return to Menu
  29.            └─3 Beeps       Play Three Beeps and return to Menu
  30.  
  31.    SOUNDS──┐
  32.            ├─Siren         Play an alert Siren and wait for an Event
  33.            ├─Scale Up      Play three octave chromatic Scale up
  34.            └─Scale Down    Play three octave chromatic Scale down
  35.  
  36.    QUIT──────              Quit this Help Demonstration
  37.            ┌────────────────────────────────────────────────┐
  38.            │ Drawbacks:    Only available while at a Menu   │
  39.            │ Benefits:     Each menu can have its own Help  │
  40.            │               Grow into Context Help System    │
  41.            └────────────────────────────────────────────────┘
  42.  
  43. ENDTEXT
  44.  
  45.    PaintCanvas Attribute 48 3,27,12,72
  46.    PaintCanvas Attribute 62 3,14,10,25
  47.    PaintCanvas Border
  48.                Attribute 59 0,0,19,73
  49.    PaintCanvas Attribute 48 0,0,0,72
  50.    PaintCanvas Attribute 48 0,0,19,0
  51.    PaintCanvas Attribute  8 14,14,18,63
  52.    PaintCanvas Attribute 31 13,12,17,61
  53.    PaintCanvas Border
  54.                Attribute 25 13,12,17,61
  55.    PaintCanvas Attribute 16 13,61,17,61
  56.    PaintCanvas Attribute 16 17,13,17,61
  57.    Canvas ON
  58.    Message "Press any key to continue..."
  59.    retval = GetChar()
  60.    WinClose
  61.    SetCanvas Default
  62.    Return
  63. ENDPROC
  64.  
  65. PROC Help!Beep.u()
  66. Private  h2, y2
  67.    DynArray y2[]
  68.       y2["Title"] = "Help for Beep"
  69.       y2["HasFrame"] = False
  70.       y2["CanMove"] = False
  71.       y2["Style"] = 63
  72.  
  73.    Window Create Floating @ 2,3 Height 20 Width 74 Attributes y2 To h2
  74.    Window Select h2
  75.    SetCanvas h2
  76.    Canvas OFF
  77.    @ 1,1
  78.    Style Attribute 63
  79.    Frame Single From 0,0 To 19,73
  80.    SetMargin 1
  81. TEXT
  82.  
  83.            ███████████  ███████████  ███████████  ███████████
  84.            ███████████  ███████████  ███████████  ███████████
  85.            ████   ████  ████         ████         ████   ████
  86.            ████   ████  ████         ████         ████   ████
  87.            █████████▀▀  ██████████   ██████████   ███████████
  88.            █████████▄▄  ██████████   ██████████   ██████████▀
  89.            ████   ████  ████         ████         ████
  90.            ████   ████  ████         ████         ████
  91.            ███████████  ███████████  ███████████  ████
  92.            ███████████  ███████████  ███████████  ████
  93.  
  94.            ┌────────────────────────────────────────────────┐
  95.            │                                                │
  96.            │     You need help for Beep!?!?!  Get Real!     │
  97.            │                                                │
  98.            └────────────────────────────────────────────────┘
  99.  
  100. ENDTEXT
  101.  
  102.    PaintCanvas Border
  103.                Attribute 59 0,0,19,73
  104.    PaintCanvas Attribute 48 0,0,0,72
  105.    PaintCanvas Attribute 48 0,0,19,0
  106.    PaintCanvas Attribute  8 14,14,18,63
  107.    PaintCanvas Attribute 31 13,12,17,61
  108.    PaintCanvas Border
  109.                Attribute 25 13,12,17,61
  110.    PaintCanvas Attribute 16 13,61,17,61
  111.    PaintCanvas Attribute 16 17,13,17,61
  112.    Canvas ON
  113.    Message "Press any key to continue..."
  114.    retval = GetChar()
  115.    WinClose
  116.    SetCanvas Default
  117.    Return
  118. ENDPROC
  119.  
  120.  
  121.    SHOWPULLDOWN
  122.       "Beep"               : "Play some Beeps"        : "BEEP.NODE"
  123.       SUBMENU
  124.          "1 Beep"          : "Play One Beep"          : "BEEP.ONE",
  125.          "2 Beeps"         : "Play Two Beeps"         : "BEEP.TWO",
  126.          "3 Beep"          : "Play Three Beeps"       : "BEEP.THREE",
  127.          "Help"            : "Help for Beeps"         : "HELP!BEEP"
  128.       ENDSUBMENU,
  129.       "Sound"              : "Play some Sounds"       : "SOUND.NODE"
  130.       SUBMENU
  131.          "Siren"           : "Play a High/Low Siren"  : "SOUND.SIREN",
  132.          "Sound ~U~p"      : "Play a Scale Up"        : "SCALE.UP",
  133.          "Sound ~D~own"    : "Play a Scale Down"      : "SCALE.DOWN"
  134.       ENDSUBMENU,
  135.       "Help"               : "Help on our Application": "HELP!MAINMENU",
  136.       "Quit"               : "Quit this Demonstration": "QUIT.NODE"
  137.       SUBMENU
  138.          "Yes"             : "Hasta la vista, Baby"   : "QUIT.YES",
  139.          "No"              : "I'll be back"           : "QUIT.NO"
  140.       ENDSUBMENU
  141.    ENDMENU
  142.  
  143. WHILE true
  144.    GetMenuSelection to a2
  145.    SWITCH
  146.       CASE a2 = "QUIT.YES"          : QUITLOOP
  147.       CASE Search("HELP!",a2) = 1   : ExecProc a2 + ".U"
  148.    ENDSWITCH
  149. ENDWHILE
  150.  
  151.  
  152.  
  153.