Annotation of mstools/mstest/include/ftestlog.mst, revision 1.1.1.1

1.1       root        1: 'XTestLog.inc - definitions for Fast Test Utility routines
                      2: '
                      3: '  Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved.
                      4: '
                      5: 'Purpose:
                      6: ' This file defines the Log and Dialog functions of the Fast Test
                      7: ' functionality
                      8: '
                      9: 
                     10: 
                     11: '**********************************************************
                     12: '***************** Log Subroutines ************************
                     13: '**********************************************************
                     14: 
                     15: ' XSetLogFileName(stFilename$)
                     16: '
                     17: ' Description:
                     18: '       Sets global variable for use as the log name
                     19: '       The global variable gsCurrentDir$ can be used to build
                     20: '       the log name (it is the current directory for when the
                     21: '       script is started).  The default log name if this function
                     22: '       is not called, is gsCurrentDir$ + "\TESTLOG.LOG"
                     23: '
                     24: ' Parameters:
                     25: '       stFilename$ - the filename to log to
                     26: '
                     27: ' Returns:
                     28: '       nothing
                     29: '
                     30: ' Example:
                     31: '       XSetLogFileName "c:\test\app.log"
                     32: '       XSetLogFileName gsCurrentDir$ + "\app.log"
                     33: 
                     34: SUB XSetLogFilename(sFilename$) STATIC
                     35: 
                     36:     gsLogFileName = sFilename$
                     37: 
                     38: END SUB
                     39: 
                     40: '
                     41: ' XSetTerminate(fTerminate%)
                     42: '
                     43: ' Description:
                     44: '       Sets the terminate state to argument.  If terminate is FALSE
                     45: '       the XLogfailure will log the failure but execution will
                     46: '       continue.  This can lead to many failures in the log do to
                     47: '       one early failure.  It can also give many valid failures in
                     48: '       a single run (checking all menu states for instance).
                     49: '
                     50: '
                     51: ' Parameters:
                     52: '       fTerminate - TRUE if should terminate on failure on, FALSE if not
                     53: '
                     54: ' Returns:
                     55: '       nothing
                     56: '
                     57: ' Example:
                     58: '       XSetTerminate FALSE      ' allow multiple failures to be logged
                     59: '
                     60: '
                     61: SUB XSetTerminate(fTerminate%) STATIC
                     62:     gfTerminate% = fTerminate%
                     63: END SUB
                     64: 
                     65: 
                     66: '
                     67: ' XLog(stString$)
                     68: '
                     69: ' Description:
                     70: '       Logs string to one or several destinations
                     71: '       1. Disk  2. Screen  3. COM1 port 4: COM2 port 5. MsgBox
                     72: '       based on a OR'd Global flag gfLogOptions. The CONST's to
                     73: '       work with are LOG_DISK, LOG_SCREEN, LOG_COM, and
                     74: '       LOG_MSGBOX respectively.
                     75: '
                     76: ' Parameters:
                     77: '       stString$  - string to Log
                     78: '
                     79: ' Returns:
                     80: '       nothing
                     81: '
                     82: ' Example:
                     83: '       XSetLogOptions LOG_DISK OR LOG_SCREEN
                     84: '       XLog "Something to Log"   'this will be logged to disk and viewport
                     85: '
                     86: '
                     87: SUB XLog (stLog$) STATIC
                     88:     DIM fh%
                     89: 
                     90:     fh% = FREEFILE
                     91: 
                     92:     IF gfLogOptions THEN
                     93:         gErrorType = ET_LOG
                     94: 
                     95: 
                     96:         IF (LOG_DISK AND gfLogOptions) THEN
                     97:             Open gsLogFileName$ For Append As #fh%
                     98:             Print #fh%, stLog$
                     99:             Close #fh%
                    100: 
                    101:         END IF
                    102: 
                    103:         IF (LOG_SCREEN AND gfLogOptions) THEN
                    104:             'Print the string to the Viewport
                    105:             Print stLog$
                    106:         END IF
                    107: 
                    108:         IF (LOG_COM1 AND gfLogOptions) THEN
                    109:             'log to comport COM1
                    110: 
                    111:             OPEN "COM1" For Append as #fh%
                    112:             Print #fh%, stLog$
                    113:             Close #fh%
                    114:         END IF
                    115: 
                    116:         IF (LOG_COM2 AND gfLogOptions) THEN
                    117:             'log to comport COM2
                    118: 
                    119:             OPEN "COM2" For Append as #fh%
                    120:             Print #fh%, stLog$
                    121:             Close #fh%
                    122:         END IF
                    123: 
                    124:         IF (LOG_MSGBOX AND gfLogOptions) THEN
                    125:             'Put the string in a MsgBox
                    126:             IF stLog$ <> "" THEN
                    127:                 Pause stLog$
                    128:             END IF
                    129:         END IF
                    130:         gErrorType = ET_NOTHING
                    131: 
                    132:     END IF  'gfLogOptions
                    133: END SUB
                    134: 
                    135: 
                    136: 
                    137: '
                    138: ' XLogBanner(stString$)
                    139: '
                    140: ' Description:
                    141: '       Logs string with a blank line before and after,
                    142: '       and adds five *'s before and after the string.
                    143: '
                    144: ' Parameters:
                    145: '       stString$  - string to Log
                    146: '
                    147: ' Returns:
                    148: '       nothing
                    149: '
                    150: ' Example:
                    151: '       XLogBanner "Starting FOO Test"
                    152: '
                    153: '
                    154: 
                    155: 
                    156: SUB XLogBanner(lpszInput$) STATIC
                    157: 
                    158:     XLog ""
                    159:     XLog "***** " + lpszInput$ + " *****"
                    160:     XLog ""
                    161: 
                    162: END SUB
                    163: 
                    164: 
                    165: 
                    166: '
                    167: ' XLogWarning(stString$)
                    168: '
                    169: ' Description:
                    170: '       Adds Warning banner to string
                    171: '
                    172: ' Parameters:
                    173: '       stString$  - string to Log
                    174: '
                    175: ' Returns:
                    176: '       nothing
                    177: '
                    178: ' Example:
                    179: '       XLogWarning "Too many menu items??"
                    180: '
                    181: '
                    182: 
                    183: SUB XLogWarning(lpszInput$) STATIC
                    184: 
                    185:     XLog ""
                    186:     XLog "!!! =====> WARNING <===== !!!"
                    187:     XLog "***** " + lpszInput$ + " *****"
                    188:     XLog ""
                    189: 
                    190: END SUB
                    191: 
                    192: 
                    193: 
                    194: ' XLogFailure (stFailure$)
                    195: '
                    196: ' Description:
                    197: '     Logs failure with banner and ends the script
                    198: '
                    199: ' Parameters:
                    200: '     stFailure - Error string to logged
                    201: '
                    202: ' Return:
                    203: '     nothing
                    204: '
                    205: ' Example:
                    206: '     XLogFailure "Button does not exist"
                    207: '
                    208: '
                    209: 
                    210: SUB XLogFailure(stFailure$) STATIC
                    211:     XLog ""
                    212:     XLog "***************** FAILURE ******************"
                    213:     XLog stFailure$
                    214:     XLog "********************************************"
                    215:     XLog ""
                    216:     IF gfTerminate THEN
                    217:         End
                    218:     ELSE
                    219:         gfFailure = TRUE
                    220:     END IF
                    221: END SUB
                    222: 
                    223: '
                    224: ' XFailureCheck
                    225: '
                    226: ' Description:
                    227: '       this routine checks to see if any failures
                    228: '       have occured.  If so, the script is stopped.  This would
                    229: '       be used if XSetTerminate has been used to disable the stopping
                    230: '       of the script on failures.
                    231: '
                    232: '
                    233: ' Parameters:
                    234: '       none
                    235: '
                    236: ' Returns:
                    237: '       nothing
                    238: '
                    239: ' Example:
                    240: '       XFailureCheck        ' fail if other failures at this point
                    241: '
                    242: '
                    243: SUB XFailureCheck STATIC
                    244:     IF gfFailure THEN
                    245:         XSetTerminate TRUE
                    246:         XLogFailure "Ending script; failures have occurred"
                    247:     END IF
                    248: END SUB
                    249: 
                    250: 
                    251: '
                    252: ' XSetLogOptions (wLogOptions%)
                    253: '
                    254: ' Description:
                    255: '     Sets the global log options flag to the passed options
                    256: '
                    257: ' Parameters:
                    258: '     wLogOptions  - a set of bits OR'ed together.
                    259: '                    currently we have LOG_COM1 LOG_COM2 LOG_SCREEN LOG_DISK
                    260: '                    and LOG_MSGBOX
                    261: ' Return:
                    262: '     nothing
                    263: '
                    264: ' Example:
                    265: '     XSetLogOptions LOG_COM1 OR LOG_SCREEN    'enable logging to screen and com1
                    266: '
                    267: SUB XSetLogOptions (wLogOptions%) STATIC
                    268:     'set the global log flag
                    269:     gfLogOptions = wLogOptions
                    270:     gfTmpLogOptions = gfLogOptions    ' allows XLogOn after XSetLogOptions
                    271: END SUB
                    272: 
                    273: 
                    274: '
                    275: ' XLogOff ()
                    276: '
                    277: ' Description:
                    278: '     Turn off logging
                    279: '
                    280: ' Parameters:
                    281: '     none
                    282: '
                    283: ' Return:
                    284: '     nothing
                    285: '
                    286: ' Example:
                    287: '     XLogOff
                    288: '
                    289: '
                    290: SUB XLogOff () STATIC
                    291:     'save the global log flag to a temporary and set options to zero
                    292:     gfTmpLogOptions = gfLogOptions
                    293:     gfLogOptions = 0
                    294: END SUB
                    295: 
                    296: 
                    297: 
                    298: '
                    299: ' XLogOn ()
                    300: '
                    301: ' Description:
                    302: '     Turn on logging
                    303: '
                    304: ' Parameters:
                    305: '     none
                    306: '
                    307: ' Return:
                    308: '     nothing
                    309: '
                    310: ' Example:
                    311: '     XLogOn
                    312: '
                    313: '
                    314: SUB XLogOn () STATIC
                    315:     'restore log options saved in temporary
                    316:     gfLogOptions = gfTmpLogOptions
                    317: END SUB
                    318: 
                    319: 
                    320: 
                    321: '**********************************************************
                    322: '***************** Dialog Subroutines *********************
                    323: '**********************************************************
                    324: 
                    325: 
                    326: 
                    327: '
                    328: ' XDialogBoxExists(s$)
                    329: '
                    330: ' Description:
                    331: '       Check if a dialog box exists with given captions
                    332: '
                    333: ' Parameters:
                    334: '       s$ - caption of dialog to search for
                    335: '
                    336: ' Returns:
                    337: '       nothing
                    338: '
                    339: ' Example:
                    340: '       XDialogBoxExists "Open"
                    341: '
                    342: '
                    343: SUB XDialogBoxExists(s$) STATIC
                    344:     ' won't work if app creates special class for its dialogs
                    345: 
                    346:     IF FindWindow(gsDialogClass$,s$) = 0 THEN
                    347:         XLogFailure "dialog box " + s$ + " doesn't exist"
                    348:     END IF
                    349: 
                    350: END SUB
                    351: 
                    352: '
                    353: ' XDialogBoxNotExists(s$)
                    354: '
                    355: ' Description:
                    356: '       Check that a dialog of given caption doesn't exist
                    357: '
                    358: ' Parameters:
                    359: '       s$ - caption of dialog to search for
                    360: '
                    361: ' Returns:
                    362: '       nothing
                    363: '
                    364: ' Example:
                    365: '       XDialogBoxNotExists "Close"
                    366: '
                    367: '
                    368: SUB XDialogBoxNotExists(s$) STATIC
                    369: 
                    370:     ' won't work if app creates special class for its dialogs
                    371: 
                    372:     IF FindWindow(gsDialogClass$,s$) <> 0 THEN
                    373:         XLogFailure "dialog box " + s$ + " exists"
                    374:     END IF
                    375: 
                    376: END SUB
                    377: 
                    378: '
                    379: ' BDialogBoxExists(s$)
                    380: '
                    381: ' Description:
                    382: '       return if a dialog with given captions exists
                    383: '
                    384: ' Parameters:
                    385: '       s$ caption of dialog to search for
                    386: '
                    387: ' Returns:
                    388: '       TRUE if exist, FALSE if not
                    389: '
                    390: ' Example:
                    391: '       fHaveOpen% = BDialogBoxExists("Open")
                    392: '
                    393: '
                    394: '
                    395: FUNCTION BDialogBoxExists%(s$) STATIC
                    396: 
                    397:     ' won't work if app creates special class for its dialogs
                    398: 
                    399:     BDialogBoxExists = FindWindow(gsDialogClass$,s$) <> 0
                    400: 
                    401: END FUNCTION
                    402: 
                    403: '
                    404: ' XWaitDialogBox(s$, WaitTime%)
                    405: '
                    406: ' Description:
                    407: '       wait for dialog box with string argument for caption and
                    408: '       integer argument as estimate of time to keep trying before
                    409: '       logging a failure
                    410: '
                    411: ' Parameters:
                    412: '       s$ - caption of dialog to search for
                    413: '       WaitTime% - max time to keep checking for dialog
                    414: '
                    415: ' Returns:
                    416: '       nothing
                    417: '
                    418: ' Example:
                    419: '       XWaitDialogBox "Done"
                    420: '
                    421: '
                    422: SUB XWaitDialogBox(s$, WaitTime%) STATIC
                    423: 
                    424:     DIM hWnd%
                    425:     DIM fDone%
                    426:     DIM fFound%
                    427:     DIM ret%
                    428: 
                    429:     fDone = FALSE
                    430:     fFound = FALSE
                    431: 
                    432: 
                    433:     WHILE NOT fDone%
                    434: 
                    435:         ' class for dialogs created by windows is gsDialogClass$
                    436:         ' won't work if app creates special class for its dialogs
                    437:         hWnd% = FindWindow(gsDialogClass$,s$)
                    438:         IF hWnd% <> 0 THEN
                    439:             fFound = TRUE
                    440:             fDone = TRUE
                    441:         ELSE
                    442:             SLEEP 1
                    443:             WaitTime% = WaitTime% - 1
                    444:             IF WaitTime% <= 0 THEN
                    445:                 fDone = TRUE
                    446:             END IF
                    447:         END IF
                    448: 
                    449:     WEND
                    450:     IF NOT fFound% THEN
                    451:         XLogFailure "FAIL """ + s$ + """ dialogbox not found"
                    452:     END IF
                    453: END SUB
                    454: 
                    455: 
                    456: 
                    457: 
                    458: 
                    459: '       **********************************************************
                    460: '       ***************** Dialog: Button Subroutines *************
                    461: '       **********************************************************
                    462: 
                    463: 
                    464: '
                    465: ' BButtonExists(stButtonName$)
                    466: '
                    467: ' Description:
                    468: '       This procedure checks to see if the specified button
                    469: '       exists or not.
                    470: '
                    471: ' Parameters:
                    472: '       stButtonName$      = button to be checked.
                    473: '
                    474: ' Returns:
                    475: '       TRUE if button exists, FALSE if button does not exist.
                    476: '
                    477: ' Example:
                    478: '       fExists% = BButtonExists("OK")
                    479: '
                    480: FUNCTION BButtonExists%(stButtonName$) STATIC
                    481: 
                    482:     BButtonExists = WButtonExists(stButtonName$) <> 0
                    483: 
                    484: END FUNCTION
                    485: 
                    486: 
                    487: '
                    488: ' XButtonExists (stButtonName$)
                    489: '
                    490: ' Description:
                    491: '       Reports error if button does not exist in active window.
                    492: '
                    493: ' Parameters:
                    494: '       stButtonName$  - button to be found.
                    495: '
                    496: ' Returns:
                    497: '       nothing
                    498: '
                    499: ' Example:
                    500: '       XButtonExists "Cancel"
                    501: '
                    502: '
                    503: '
                    504: SUB XButtonExists(stButton$) STATIC
                    505:     IF BButtonExists(stButton$) = 0 THEN
                    506:         XLogFailure stButton$ + " does not Exist"
                    507:     END IF
                    508: END SUB
                    509: 
                    510: 
                    511: '
                    512: ' XButtonNotExists (stButtonName$)
                    513: '
                    514: ' Description:
                    515: '       Reports error if button Exists in active window.
                    516: '
                    517: ' Parameters:
                    518: '       stButtonName$  - button to not be found.
                    519: '
                    520: ' Returns:
                    521: '       nothing
                    522: '
                    523: ' Example:
                    524: '       XButtonNotExists "Cancel"
                    525: '
                    526: '
                    527: '
                    528: SUB XButtonNotExists(stButton$) STATIC
                    529:     IF BButtonExists(stButton$) THEN
                    530:         XLogFailure stButton$ + " Exists"
                    531:     END IF
                    532: END SUB
                    533: 
                    534: 
                    535: '
                    536: ' BButtonEnabled(stButtonName$)
                    537: '
                    538: ' Description:
                    539: '       This procedure checks to see if the specified button
                    540: '       is enabled or not.
                    541: '
                    542: ' Parameters:
                    543: '       stButtonName$ - button to be checked.
                    544: '
                    545: ' Returns:
                    546: '       TRUE if button enabled, FALSE if button not enabled.
                    547: '
                    548: ' Example:
                    549: '       fEnabled% = BButtonEnabled("OK")
                    550: '
                    551: FUNCTION BButtonEnabled%(stButtonName$) STATIC
                    552: 
                    553:     BButtonEnabled = WButtonEnabled(stButtonName$) <> 0
                    554: 
                    555: END FUNCTION
                    556: 
                    557: 
                    558: '
                    559: ' XButtonEnabled (stButtonName$)
                    560: '
                    561: ' Description:
                    562: '       Reports error if button is not Enabled.
                    563: '
                    564: ' Parameters:
                    565: '       stButtonName$  - button to be checked.
                    566: '
                    567: ' Returns:
                    568: '       nothing
                    569: '
                    570: ' Example:
                    571: '       XButtonEnabled "Cancel"
                    572: '
                    573: '
                    574: SUB XButtonEnabled(stButton$) STATIC
                    575:     XButtonExists stButton$
                    576:     IF BButtonEnabled(stButton$) = 0 THEN
                    577:         XLogFailure stButton$ + " is not Enabled"
                    578:     END IF
                    579: END SUB
                    580: 
                    581: 
                    582: '
                    583: ' XButtonNotEnabled (stButtonName$)
                    584: '
                    585: ' Description:
                    586: '       Reports error if button is Enabled.
                    587: '
                    588: ' Parameters:
                    589: '       stButtonName$  - button to be checked.
                    590: '
                    591: ' Returns:
                    592: '       nothing
                    593: '
                    594: ' Example:
                    595: '       XButtonNotEnabled "Cancel"
                    596: '
                    597: '
                    598: SUB XButtonNotEnabled(stButton$) STATIC
                    599:     XButtonExists stButton$
                    600:     IF BButtonEnabled(stButton$) THEN
                    601:         XLogFailure stButton$ + " Enabled"
                    602:     END IF
                    603: END SUB
                    604: 
                    605: 
                    606: '
                    607: ' XClickButton(stButtonName$)
                    608: '
                    609: ' Description:
                    610: '       This procedure clicks the specified button in the
                    611: '       currently active window.
                    612: '
                    613: ' Parameters:
                    614: '       stButtonName$ - button to be clicked.
                    615: '
                    616: ' Returns:
                    617: '       nothing
                    618: '
                    619: ' Example:
                    620: '       XClickButton "OK"
                    621: '
                    622: '
                    623: SUB XClickButton(stButtonName$) STATIC
                    624:     XButtonExists stButtonName$
                    625:     WButtonClick stButtonName$
                    626: 
                    627: END SUB
                    628: 
                    629: 
                    630: 
                    631: '       **********************************************************
                    632: '       ************* Dialog: List Box Subroutines ***************
                    633: '       **********************************************************
                    634: 
                    635: 
                    636: 
                    637: '
                    638: ' BListBoxExists(stListBox$)
                    639: '
                    640: ' Description:
                    641: '       This procedure checks to see if the specified ListBox
                    642: '       exists or not.
                    643: '
                    644: ' Parameters:
                    645: '       stListBox$ - ListBox to be checked.
                    646: '
                    647: ' Returns:
                    648: '       TRUE if ListBox exists, FALSE if ListBox does not exist.
                    649: '
                    650: ' Example:
                    651: '       fExists% = BListBoxExists("cars")
                    652: '
                    653: FUNCTION BListBoxExists%(stListBox$) STATIC
                    654: 
                    655:     BListBoxExists = WListExists(stListBox$) <> 0
                    656: 
                    657: END FUNCTION
                    658: 
                    659: 
                    660: '
                    661: ' XListBoxExists (stListBox$)
                    662: '
                    663: ' Description:
                    664: '       Reports error if ListBox does not exist in active window.
                    665: '
                    666: ' Parameters:
                    667: '       stListBox$  - ListBox to be found.
                    668: '
                    669: ' Returns:
                    670: '       nothing
                    671: '
                    672: ' Example:
                    673: '       XListBoxExists "Cars"
                    674: '
                    675: '
                    676: SUB XListBoxExists(stListBox$) STATIC
                    677: 
                    678:     IF WListExists(stListBox$) = 0 THEN
                    679:         XLogFailure "ListBox " + stListBox$ + " does not Exist"
                    680:     END IF
                    681: 
                    682: END SUB
                    683: 
                    684: '
                    685: ' XListBoxNotExists (stListBox$)
                    686: '
                    687: ' Description:
                    688: '       Reports error if ListBox exists in active window.
                    689: '
                    690: ' Parameters:
                    691: '       stListBox$  - ListBox not to be found.
                    692: '
                    693: ' Returns:
                    694: '       nothing
                    695: '
                    696: ' Example:
                    697: '       XListBoxNotExists "cars"
                    698: '
                    699: SUB XListBoxNotExists(stListBox$) STATIC
                    700: 
                    701:     IF WListExists(stListBox$) THEN
                    702:         XLogFailure "ListBox " + stListBox$ + " exists"
                    703:     END IF
                    704: 
                    705: END SUB
                    706: 
                    707: 
                    708: 
                    709: 
                    710: 
                    711: '
                    712: ' XFocusListBox(stListBox$)
                    713: '
                    714: ' Description:
                    715: '       This procedure puts focus to the specified ListBox in the
                    716: '       currently active window.
                    717: '
                    718: ' Parameters:
                    719: '       stListBox$ - ListBox to be given focus.
                    720: '
                    721: ' Returns:
                    722: '       nothing
                    723: '
                    724: ' Example:
                    725: '       XFocusListBox "&Files:"
                    726: '
                    727: SUB XFocusListBox(stListBox$) STATIC
                    728: 
                    729:     IF WListExists(stListBox$) THEN
                    730:         WListItemClk stListBox$,1     'it now has focus
                    731:     ELSE
                    732:         XLogFailure "Could not put focus on " + stListBox$ + " ListBox"
                    733:     END IF
                    734: 
                    735: END SUB
                    736: 
                    737: 
                    738: 
                    739: 
                    740: '
                    741: ' IGetListBoxItemCount%(stListBox$)
                    742: '
                    743: ' Description:
                    744: '       Returns the number of items in listbox stListBox$.
                    745: '
                    746: ' Parameters:
                    747: '       stListBox$ - ListBox to get item count from
                    748: '
                    749: ' Returns:
                    750: '       Int   -  List box item count
                    751: '
                    752: ' Example:
                    753: '       num% = IGetListBoxItemCount ("cars")
                    754: '
                    755: '
                    756: FUNCTION IGetListBoxItemCount%(stListBox$) STATIC
                    757:     XListBoxExists stListBox$
                    758:     IGetListBoxItemCount = WListCount(stListBox$)
                    759: 
                    760: END FUNCTION
                    761: 
                    762: 
                    763: 
                    764: '
                    765: ' BListBoxItemExists%(stListBox$, stListBoxItem$)
                    766: '
                    767: ' Description:
                    768: '       Returns true if list box item exists, false otherwise.
                    769: '
                    770: ' Parameters:
                    771: '       stListBox$- ListBox to look in
                    772: '       stListBoxItem$ - Item to look for
                    773: '
                    774: ' Returns:
                    775: '       Int - 0 if item does not exist, positive val otherwise
                    776: '
                    777: ' Example:
                    778: '       flag% = BListBoxItemExists ("&Files:","FOO.C")
                    779: '
                    780: '
                    781: FUNCTION BListBoxItemExists%(stListBox$, stListBoxItem$) STATIC
                    782: 
                    783:     BListBoxItemExists = WListItemExists (stListBox$, stListBoxItem$) <> 0
                    784: 
                    785: END FUNCTION
                    786: 
                    787: 
                    788: 
                    789: 
                    790: '
                    791: ' XListBoxItemExists(stListBox$, stListBoxItem$)
                    792: '
                    793: ' Description:
                    794: '       Logs failure if list box item does not exist
                    795: '
                    796: ' Parameters:
                    797: '       stListBox$- ListBox to look in
                    798: '       stListBoxItem$ - Item to look for
                    799: '
                    800: ' Returns:
                    801: '       nothing
                    802: '
                    803: ' Example:
                    804: '       XListBoxItemExists "&Files:","FOO.C"
                    805: '
                    806: '
                    807: SUB XListBoxItemExists (stListBox$, stListBoxItem$) STATIC
                    808: 
                    809:     XListBoxExists stListBox$
                    810:     IF WListItemExists (stListBox$, stListBoxItem$) = 0 THEN
                    811:         XLogFailure "ListBoxItem " + stListBoxItem$ + " does not exist"
                    812:     END IF
                    813: 
                    814: END SUB
                    815: 
                    816: 
                    817: '
                    818: ' XListBoxItemNotExists(stListBox$, stListBoxItem$)
                    819: '
                    820: ' Description:
                    821: '       Logs failure if list box item exists
                    822: '
                    823: ' Parameters:
                    824: '       stListBox$ - ListBox to look in
                    825: '       stListBoxItem$ - Item to look for
                    826: '
                    827: ' Returns:
                    828: '       nothing
                    829: '
                    830: ' Example:
                    831: '       XListBoxItemNotExists "&Files:","FOO.C"
                    832: '
                    833: '
                    834: SUB XListBoxItemNotExists (stListBox$, stListBoxItem$) STATIC
                    835: 
                    836:     XListBoxExists stListBox$
                    837:     IF WListItemExists (stListBox$, stListBoxItem$) <> 0 THEN
                    838:         XLogFailure "ListBoxItem " + stListBoxItem$ + " exists"
                    839:     END IF
                    840: 
                    841: END SUB
                    842: 
                    843: 
                    844: 
                    845: 
                    846: '
                    847: ' XClickListBoxItem(stListBox$, stListBoxItem$)
                    848: '
                    849: ' Description:
                    850: '       Clicks on list box item
                    851: '
                    852: ' Parameters:
                    853: '       stListBox$ - ListBox to look in
                    854: '       stListBoxItem$ - Item to click on
                    855: '
                    856: ' Returns:
                    857: '       nothing
                    858: '
                    859: ' Example:
                    860: '       XClickListBoxItem "&Files:","FOO.C"
                    861: '
                    862: '
                    863: SUB XClickListBoxItem (stListBox$, stListBoxItem$) STATIC
                    864: 
                    865:     XListBoxExists stListBox$
                    866:     XListBoxItemExists stListBox$, stListBoxItem$
                    867:     WListItemClkT stListBox$, stListBoxItem$
                    868: 
                    869: END SUB
                    870: 
                    871: 
                    872: 
                    873: 
                    874: '
                    875: ' XDblClickListBoxItem% (stListBox$, stListBoxItem$)
                    876: '
                    877: ' Description:
                    878: '       Clicks on list box item
                    879: '
                    880: ' Parameters:
                    881: '       stListBox$ - ListBox to look in
                    882: '       stListBoxItem$ - Item to click on
                    883: '
                    884: ' Returns:
                    885: '       nothing
                    886: '
                    887: ' Example:
                    888: '       XDblClickListBoxItem "&Files:","FOO.C"
                    889: '
                    890: '
                    891: SUB XDblClickListBoxItem (stListBox$, stListBoxItem$) STATIC
                    892: 
                    893:     XListBoxExists stListBox$
                    894:     XListBoxItemExists stListBox$, stListBoxItem$
                    895:     WListItemDblClkT stListBox$, stListBoxItem$
                    896: 
                    897: END SUB
                    898: 
                    899: 
                    900: 
                    901: 
                    902: '
                    903: ' SGetListBoxItemText (stListBox$)
                    904: '
                    905: ' Description:
                    906: '       Returns currently selected list box item
                    907: '
                    908: ' Parameters:
                    909: '       stListBox$ is the listbox to get item from
                    910: '
                    911: ' Returns:
                    912: '       ListBox Item string
                    913: '
                    914: ' Example:
                    915: '       a$ = SGetListBoxItemText ("&User List:")
                    916: '
                    917: '
                    918: FUNCTION SGetListBoxItemText$(stListBox$) STATIC
                    919: 
                    920:     XListBoxExists stListBox$
                    921:     SGetListBoxItemText = ListText(stListBox$)
                    922: 
                    923: END FUNCTION
                    924: 
                    925: 
                    926: 
                    927: '       **********************************************************
                    928: '       ************* Dialog: Combo Box Subroutines **************
                    929: '       **********************************************************
                    930: 
                    931: 
                    932: 
                    933: '
                    934: ' BComboBoxExists%(stComboBox$)
                    935: '
                    936: ' Description:
                    937: '       This procedure checks to see if the specified ComboBox
                    938: '       exists or not.
                    939: '
                    940: ' Parameters:
                    941: '       stComboBox$  = ComboBox to be checked.
                    942: '
                    943: ' Returns:
                    944: '       TRUE if ComboBox exists.
                    945: '       FALSE if ComboBox does not exist.
                    946: '
                    947: ' Example:
                    948: '       fExists% = BComboBoxExists("&File")
                    949: '
                    950: FUNCTION BComboBoxExists%(stComboBox$) STATIC
                    951: 
                    952:     BComboBoxExists = WComboExists(stComboBox$) <> 0
                    953: 
                    954: END FUNCTION
                    955: 
                    956: 
                    957: '
                    958: ' XComboBoxExists (stComboBox$)
                    959: '
                    960: ' Description:
                    961: '       Reports error if ComboBox does not exist in active window.
                    962: '
                    963: ' Parameters:
                    964: '       stComboBox$  - ComboBox to be found.
                    965: '
                    966: ' Returns:
                    967: '       nothing
                    968: '
                    969: ' Example:
                    970: '       XComboBoxExists "&File"
                    971: '
                    972: '
                    973: SUB XComboBoxExists(stComboBox$) STATIC
                    974: 
                    975:     IF WComboExists(stComboBox$) = 0 THEN
                    976:         XLogFailure "ComboBox " + stComboBox$ + " does not Exist"
                    977:     END IF
                    978: 
                    979: END SUB
                    980: 
                    981: '
                    982: ' XComboBoxNotExists (stComboBox$)
                    983: '
                    984: ' Description:
                    985: '       Reports error if ComboBox exists in active window.
                    986: '
                    987: ' Parameters:
                    988: '       stComboBox$  - ComboBox not to be found.
                    989: '
                    990: ' Returns:
                    991: '       nothing
                    992: '
                    993: ' Example:
                    994: '       XComboBoxNotExists "&File"
                    995: '
                    996: SUB XComboBoxNotExists(stComboBox$) STATIC
                    997: 
                    998:     IF WComboExists(stComboBox$) THEN
                    999:         XLogFailure "ComboBox " + stComboBox$ + " exists"
                   1000:     END IF
                   1001: 
                   1002: END SUB
                   1003: 
                   1004: 
                   1005: 
                   1006: 
                   1007: 
                   1008: '
                   1009: ' XFocusComboBox(stComboBox$)
                   1010: '
                   1011: ' Description:
                   1012: '       This procedure puts focus to the specified ComboBox in the
                   1013: '       currently active window.
                   1014: '
                   1015: ' Parameters:
                   1016: '       stComboBox$  = ComboBox to be given focus.
                   1017: '
                   1018: ' Returns:
                   1019: '       nothing
                   1020: '
                   1021: ' Example:
                   1022: '       XFocusComboBox("&Files:")
                   1023: '
                   1024: SUB XFocusComboBox(stComboBox$) STATIC
                   1025: 
                   1026:     IF WComboExists(stComboBox$) THEN
                   1027:         WComboItemClk stComboBox$,1     'it now has focus
                   1028:     ELSE
                   1029:         XLogFailure "Could not put focus on " + stComboBox$ + " ComboBox"
                   1030:     END IF
                   1031: 
                   1032: END SUB
                   1033: 
                   1034: 
                   1035: 
                   1036: 
                   1037: '
                   1038: ' IWGetComboBoxItemCount%(stComboBox$)
                   1039: '
                   1040: ' Description:
                   1041: '       Returns the number of items in ComboBox stComboBox$.
                   1042: '
                   1043: ' Parameters:
                   1044: '       stComboBox$ - ComboBox to get item count from
                   1045: '
                   1046: ' Returns:
                   1047: '       Int   -  Combo box item count
                   1048: '
                   1049: ' Example:
                   1050: '       num% = WComboBoxItemCount ()
                   1051: '
                   1052: '
                   1053: FUNCTION IGetComboBoxItemCount%(stComboBox$) STATIC
                   1054:     XComboBoxExists stComboBox$
                   1055:     IGetComboBoxItemCount = WComboCount(stComboBox$)
                   1056: 
                   1057: END FUNCTION
                   1058: 
                   1059: 
                   1060: 
                   1061: '
                   1062: ' BComboBoxItemExists%(stComboBox$, stComboBoxItem$)
                   1063: '
                   1064: ' Description:
                   1065: '       Returns true if Combo box item exists, false otherwise.
                   1066: '
                   1067: ' Parameters:
                   1068: '       stComboBox$ - ComboBox to look in
                   1069: '       stComboBoxItem$ - Item to look for
                   1070: '
                   1071: ' Returns:
                   1072: '       Int - 0 if item does not exist, positive val otherwise
                   1073: '
                   1074: ' Example:
                   1075: '       flag% = BComboBoxItemExists("&Files","FOO.C")
                   1076: '
                   1077: FUNCTION BComboBoxItemExists%(stComboBox$, stComboBoxItem$) STATIC
                   1078: 
                   1079:     BComboBoxItemExists = WComboItemExists (stComboBox$, stComboBoxItem$) <> 0
                   1080: 
                   1081: END FUNCTION
                   1082: 
                   1083: 
                   1084: 
                   1085: 
                   1086: '
                   1087: ' XComboBoxItemExists(stComboBox$, stComboBoxItem$)
                   1088: '
                   1089: ' Description:
                   1090: '       Logs failure if combo box item does not exist
                   1091: '
                   1092: ' Parameters:
                   1093: '       stComboBox$ - ComboBox to look in
                   1094: '       stComboBoxItem$ - Item to look for
                   1095: '
                   1096: ' Returns:
                   1097: '       nothing
                   1098: '
                   1099: ' Example:
                   1100: '       XComboBoxItemExists "&Files","FOO.C"
                   1101: '
                   1102: '
                   1103: SUB XComboBoxItemExists (stComboBox$, stComboBoxItem$) STATIC
                   1104:     XComboBoxExists stComboBox$
                   1105:     IF WComboItemExists (stComboBox$, stComboBoxItem$) = 0 THEN
                   1106:         XLogFailure "ComboBoxItem " + stComboBoxItem$ + " does not exist"
                   1107:     END IF
                   1108: 
                   1109: END SUB
                   1110: 
                   1111: 
                   1112: '
                   1113: ' XComboBoxItemNotExists(stComboBox$, stComboBoxItem$)
                   1114: '
                   1115: ' Description:
                   1116: '       Logs failure if combo box item exists
                   1117: '
                   1118: ' Parameters:
                   1119: '       stComboBox$ - ComboBox to look in
                   1120: '       stComboBoxItem$ - Item to look for
                   1121: '
                   1122: ' Returns:
                   1123: '       nothing
                   1124: '
                   1125: ' Example:
                   1126: '       XComboBoxItemNotExists "&Files","FOO.C"
                   1127: '
                   1128: '
                   1129: SUB XComboBoxItemNotExists (stComboBox$, stComboBoxItem$) STATIC
                   1130: 
                   1131:     XComboBoxExists stComboBox$
                   1132:     IF WComboItemExists (stComboBox$, stComboBoxItem$) THEN
                   1133:         XLogFailure "ComboBoxItem " + stComboBoxItem$ + " exists"
                   1134:     END IF
                   1135: 
                   1136: END SUB
                   1137: 
                   1138: 
                   1139: 
                   1140: 
                   1141: '
                   1142: ' XClickComboBoxItem(stComboBox$, stComboBoxItem$)
                   1143: '
                   1144: ' Description:
                   1145: '       Clicks on Combo box item
                   1146: '
                   1147: ' Parameters:
                   1148: '       stComboBox$ - ComboBox to look in
                   1149: '       stComboBoxItem$ - Item to click on
                   1150: '
                   1151: ' Returns:
                   1152: '       nothing
                   1153: '
                   1154: ' Example:
                   1155: '       XClickComboBoxItem "&Files","FOO.C"
                   1156: '
                   1157: '
                   1158: SUB XClickComboBoxItem (stComboBox$, stComboBoxItem$) STATIC
                   1159: 
                   1160:     XComboBoxExists stComboBox$
                   1161:     XComboBoxItemExists stComboBox$,stComboBoxItem$
                   1162:     WComboItemClkT stComboBox$, stComboBoxItem$
                   1163: 
                   1164: END SUB
                   1165: 
                   1166: 
                   1167: 
                   1168: 
                   1169: '
                   1170: ' XDblClickComboBoxItem% (stComboBox$, stComboBoxItem$)
                   1171: '
                   1172: ' Description:
                   1173: '       Clicks on combo box item
                   1174: '
                   1175: ' Parameters:
                   1176: '       stComboBox$ - ComboBox to look in
                   1177: '       stComboBoxItem$ - Item to click on
                   1178: '
                   1179: ' Returns:
                   1180: '       nothing
                   1181: '
                   1182: ' Example:
                   1183: '       XDblClickComboBoxItem "&Files","FOO.C"
                   1184: '
                   1185: '
                   1186: SUB XDblClickComboBoxItem (stComboBox$, stComboBoxItem$) STATIC
                   1187: 
                   1188:     XComboBoxExists stComboBox$
                   1189:     XComboBoxItemExists stComboBox$,stComboBoxItem$
                   1190:     WComboItemDblClkT stComboBox$, stComboBoxItem$
                   1191: 
                   1192: END SUB
                   1193: 
                   1194: 
                   1195: 
                   1196: 
                   1197: '
                   1198: ' StGetComboBoxItemText (stComboBox$)
                   1199: '
                   1200: ' Description:
                   1201: '       Returns currently selected Combo box item
                   1202: '
                   1203: ' Parameters:
                   1204: '       stComboBox$ is the ComboBox to get item from
                   1205: '
                   1206: ' Returns:
                   1207: '       ComboBox Item string
                   1208: '
                   1209: ' Example:
                   1210: '       a$ = SGetComboBoxItemText ("&User List:")
                   1211: '
                   1212: FUNCTION SGetComboBoxItemText$(stComboBox$) STATIC
                   1213: 
                   1214:     XComboBoxExists stComboBox$
                   1215:     XComboBoxItemExists stComboBox$,stComboBoxItem$
                   1216:     SGetComboBoxItemText = ComboText(stComboBox$)
                   1217: 
                   1218: END FUNCTION
                   1219: 
                   1220: 
                   1221: 
                   1222: '       **********************************************************
                   1223: '       ************* Dialog: Check Box Subroutines **************
                   1224: '       **********************************************************
                   1225: 
                   1226: 
                   1227: 
                   1228: '
                   1229: ' BCheckBoxExists(stCheckBox$)
                   1230: '
                   1231: ' Description:
                   1232: '       This procedure checks to see if the specified CheckBox
                   1233: '       exists or not.
                   1234: '
                   1235: ' Parameters:
                   1236: '       stCheckBox$ = CheckBox to be checked.
                   1237: '
                   1238: ' Returns:
                   1239: '       TRUE if CheckBox exists.
                   1240: '       FALSE if CheckBox does not exist.
                   1241: '
                   1242: ' Example:
                   1243: '       fExists% = BCheckBoxExists("&Delete")
                   1244: '
                   1245: FUNCTION BCheckBoxExists%(stCheckBox$) STATIC
                   1246: 
                   1247:     BCheckBoxExists = WCheckExists(stCheckBox$) <> 0
                   1248: 
                   1249: END FUNCTION
                   1250: 
                   1251: 
                   1252: '
                   1253: ' XCheckBoxExists (stCheckBox$)
                   1254: '
                   1255: ' Description:
                   1256: '       Reports error if CheckBox does not exist in active window.
                   1257: '
                   1258: ' Parameters:
                   1259: '       stCheckBox$  - CheckBox to be found.
                   1260: '
                   1261: ' Returns:
                   1262: '       nothing
                   1263: '
                   1264: ' Example:
                   1265: '       XCheckBoxExists "&Delete"
                   1266: '
                   1267: SUB XCheckBoxExists(stCheckBox$) STATIC
                   1268:     IF BCheckBoxExists(stCheckBox$) = 0 THEN
                   1269:         XLogFailure "CheckBox " + stCheckBox$ + " does not Exist"
                   1270:     END IF
                   1271: END SUB
                   1272: 
                   1273: 
                   1274: '
                   1275: ' XCheckBoxNotExists (stCheckBox$)
                   1276: '
                   1277: ' Description:
                   1278: '       Reports error if CheckBox Exists in active window.
                   1279: '
                   1280: ' Parameters:
                   1281: '       stCheckBox$  - CheckBox to not be found.
                   1282: '
                   1283: ' Returns:
                   1284: '       nothing
                   1285: '
                   1286: ' Example:
                   1287: '       XCheckBoxNotExists "&Delete"
                   1288: '
                   1289: '
                   1290: SUB XCheckBoxNotExists(stCheckBox$) STATIC
                   1291:     IF BCheckBoxExists(stCheckBox$) THEN
                   1292:         XLogFailure "CheckBox " + stCheckBox$ + " Exists"
                   1293:     END IF
                   1294: END SUB
                   1295: 
                   1296: '
                   1297: ' BCheckBoxChecked(stCheckBox$)
                   1298: '
                   1299: ' Description:
                   1300: '       This procedure checks the state of checkbox
                   1301: '
                   1302: ' Parameters:
                   1303: '       stCheckBox$ = CheckBox to check state of.
                   1304: '
                   1305: ' Returns:
                   1306: '       -1(true) if the check box is checked.
                   1307: '       0(false) if the check box is not checked.
                   1308: '
                   1309: ' Example:
                   1310: '       state% = BCheckBoxChecked("Special")
                   1311: '
                   1312: FUNCTION BCheckBoxChecked%(stCheckBox$) STATIC
                   1313:     BCheckBoxChecked = WCheckState(stCheckBox$) <> 0
                   1314: END FUNCTION
                   1315: 
                   1316: 
                   1317: '
                   1318: ' XCheckBoxChecked(stCheckBox$)
                   1319: '
                   1320: ' Description:
                   1321: '       This procedure checks the state of checkbox
                   1322: '
                   1323: ' Parameters:
                   1324: '       stCheckBox$ = CheckBox to check state of.
                   1325: '
                   1326: ' Returns:
                   1327: '       -1(true) if the check box is checked.
                   1328: '       0(false) if the check box is not checked.
                   1329: '
                   1330: ' Example:
                   1331: '       XCheckBoxChecked "Special"
                   1332: '
                   1333: SUB XCheckBoxChecked(stCheckBox$) STATIC
                   1334:     XCheckBoxExists stCheckBox$
                   1335:     IF BCheckBoxChecked(stCheckBox$) = 0 THEN
                   1336:         XLogFailure "CheckBox " + stCheckBox$ + " is not checked"
                   1337:     END IF
                   1338: 
                   1339: END SUB
                   1340: 
                   1341: '
                   1342: ' XCheckBoxNotChecked(stCheckBox$)
                   1343: '
                   1344: ' Description:
                   1345: '       This procedure checks the state of checkbox
                   1346: '
                   1347: ' Parameters:
                   1348: '       stCheckBox$ = CheckBox to check state of.
                   1349: '
                   1350: ' Returns:
                   1351: '       -1(true) if the check box is checked.
                   1352: '       0(false) if the check box is not checked.
                   1353: '
                   1354: ' Example:
                   1355: '       XCheckBoxNotChecked "Special"
                   1356: '
                   1357: SUB XCheckBoxNotChecked(stCheckBox$) STATIC
                   1358:     XCheckBoxExists stCheckBox$
                   1359:     IF BCheckBoxChecked(stCheckBox$) THEN
                   1360:         XLogFailure "CheckBox " + stCheckBox$ + " is checked"
                   1361:     END IF
                   1362: 
                   1363: END SUB
                   1364: 
                   1365: 
                   1366: '
                   1367: ' BCheckBoxEnabled(stCheckBox$)
                   1368: '
                   1369: ' Description:
                   1370: '       This procedure checks to see if the specified CheckBox
                   1371: '       is enabled or not.
                   1372: '
                   1373: ' Parameters:
                   1374: '       stCheckBox$ = CheckBox to be checked.
                   1375: '
                   1376: ' Returns:
                   1377: '       TRUE if CheckBox enabled.
                   1378: '       FALSE if CheckBox not enabled.
                   1379: '
                   1380: ' Example:
                   1381: '       fEnabled% = BCheckBoxEnabled("&Delete")
                   1382: '
                   1383: FUNCTION BCheckBoxEnabled%(stCheckBox$) STATIC
                   1384: 
                   1385:     BCheckBoxEnabled = WCheckEnabled(stCheckBox$) <> 0
                   1386: 
                   1387: END FUNCTION
                   1388: 
                   1389: 
                   1390: '
                   1391: ' XCheckBoxEnabled (stCheckBox$)
                   1392: '
                   1393: ' Description:
                   1394: '       Reports error if CheckBox is not Enabled.
                   1395: '
                   1396: ' Parameters:
                   1397: '       stCheckBox$  - CheckBox to be checked.
                   1398: '
                   1399: ' Returns:
                   1400: '       nothing
                   1401: '
                   1402: ' Example:
                   1403: '       XCheckBoxEnabled "&Delete"
                   1404: '
                   1405: '
                   1406: SUB XCheckBoxEnabled(stCheckBox$) STATIC
                   1407:     XCheckBoxExists(stCheckBox$)
                   1408:     IF BCheckBoxEnabled(stCheckBox$) = 0 THEN
                   1409:         XLogFailure "CheckBox " + stCheckBox$ + " is not Enabled"
                   1410:     END IF
                   1411: END SUB
                   1412: 
                   1413: 
                   1414: '
                   1415: ' XCheckBoxNotEnabled (stCheckBox$)
                   1416: '
                   1417: ' Description:
                   1418: '       Reports error if CheckBox is Enabled.
                   1419: '
                   1420: ' Parameters:
                   1421: '       stCheckBox$  - CheckBox to be checked.
                   1422: '
                   1423: ' Returns:
                   1424: '       nothing
                   1425: '
                   1426: ' Example:
                   1427: '       XCheckBoxNotEnabled "&Delete"
                   1428: '
                   1429: SUB XCheckBoxNotEnabled(stCheckBox$) STATIC
                   1430:     XCheckBoxExists(stCheckBox$)
                   1431:     IF BCheckBoxEnabled(stCheckBox$) THEN
                   1432:         XLogFailure "CheckBox " + stCheckBox$ + " is Enabled"
                   1433:     END IF
                   1434: 
                   1435: END SUB
                   1436: 
                   1437: 
                   1438: '
                   1439: ' XClickCheckBox(stCheckBox$)
                   1440: '
                   1441: ' Description:
                   1442: '       This procedure clicks the specified CheckBox in the
                   1443: '       currently active window.
                   1444: '
                   1445: ' Parameters:
                   1446: '       stCheckBox$ = CheckBox to be clicked.
                   1447: '
                   1448: ' Returns:
                   1449: '       nothing
                   1450: '
                   1451: ' Example:
                   1452: '       XClickCheckBox "&Delete"
                   1453: '
                   1454: SUB XClickCheckBox(stCheckBox$) STATIC
                   1455:     XCheckBoxExists stCheckBox$
                   1456:     WCheckClick stCheckBox$
                   1457: 
                   1458: END SUB
                   1459: 
                   1460: 
                   1461: 
                   1462: '       **********************************************************
                   1463: '       ************* Dialog: Edit Control Subroutines ***********
                   1464: '       **********************************************************
                   1465: 
                   1466: 
                   1467: '
                   1468: ' XEditTextExists(stEditText$)
                   1469: '
                   1470: ' Description:
                   1471: '       This procedure checks to see if the specified EditText
                   1472: '       exists or not.
                   1473: '
                   1474: ' Parameters:
                   1475: '       stEditText$ = EditText to be checked.
                   1476: '
                   1477: ' Returns:
                   1478: '       TRUE if EditText exists.
                   1479: '       FALSE if EditText does not exist.
                   1480: '
                   1481: ' Example:
                   1482: '       XEditTextExists "File"
                   1483: '
                   1484: SUB XEditTextExists(stEditText$) STATIC
                   1485: 
                   1486:     IF BEditTextExists(stEditText$) = 0 THEN
                   1487:         XLogFailure "Edit Text control " + stEditText$ + " does not exist"
                   1488:     END IF
                   1489: 
                   1490: END SUB
                   1491: 
                   1492: '
                   1493: ' XEditTextNotExists(stEditTextNot$)
                   1494: '
                   1495: ' Description:
                   1496: '       This procedure checks to see that the specified EditText
                   1497: '       doesn't exist
                   1498: '
                   1499: ' Parameters:
                   1500: '       stEditTextNot$ = EditText to be checked.
                   1501: '
                   1502: ' Example:
                   1503: '       XEditTextNotExists "File"
                   1504: '
                   1505: SUB XEditTextNotExists(stEditTextNot$) STATIC
                   1506: 
                   1507:     IF BEditTextExists(stEditTextNot$) THEN
                   1508:         XLogFailure "Edit Text control " + stEditTextNot$ + " exists"
                   1509:     END IF
                   1510: 
                   1511: END SUB
                   1512: 
                   1513: '
                   1514: ' BEditTextExists(stEditText$)
                   1515: '
                   1516: ' Description:
                   1517: '       This procedure checks to see if the specified EditText
                   1518: '       exists or not.
                   1519: '
                   1520: ' Parameters:
                   1521: '       stEditText$ = EditText to be checked.
                   1522: '
                   1523: ' Returns:
                   1524: '       TRUE if EditText exists.
                   1525: '       FALSE if EditText does not exist.
                   1526: '
                   1527: ' Example:
                   1528: '       fExists% = BEditTextExists("File")
                   1529: '
                   1530: FUNCTION BEditTextExists%(stEditText$) STATIC
                   1531: 
                   1532:     BEditTextExists = WEditExists(stEditText$) <> 0
                   1533: 
                   1534: END FUNCTION
                   1535: 
                   1536: '
                   1537: ' StGetEditText (stEditCaption$)
                   1538: '
                   1539: ' Description:
                   1540: '        Returns string in Edit box with caption stEditCaption$
                   1541: '        Logs error if stEditCaption$ is not found, or if Edit control
                   1542: '        is not found following stEditCaption$ in the tabbing order.
                   1543: '
                   1544: ' Parameters:
                   1545: '       stEditCaption$ - Caption that is associated with edit control
                   1546: '
                   1547: ' Returns:
                   1548: '       String that is in the Edit control
                   1549: '
                   1550: ' Example:
                   1551: '       a$ = SGetEditText("&FileName:")
                   1552: '
                   1553: '
                   1554: FUNCTION SGetEditText$(stEditCaption$) STATIC
                   1555:     XEditTextExists stEditCaption$
                   1556:     SGetEditText = EditText(stEditCaption$)
                   1557: 
                   1558: END FUNCTION
                   1559: 
                   1560: 
                   1561: 
                   1562: 
                   1563: 
                   1564: '
                   1565: ' XSetEditText (stEditCaption$, stEditText$)
                   1566: '
                   1567: ' Description:
                   1568: '       Puts string stEditText$ in Edit box with caption stEditCaption$
                   1569: '       Logs error if stEditCaption$ is not found, or if Edit control
                   1570: '       is not found following stEditCaption$ in the tabbing order.
                   1571: '
                   1572: ' Parameters:
                   1573: '       stEditCaption$ - Caption that is associated with edit control
                   1574: '       stEditText$ - Text to put in the Edit control
                   1575: '
                   1576: ' Returns:
                   1577: '       nothing
                   1578: '
                   1579: ' Example:
                   1580: '       XSetEditText "&FileName:", "calc.exe"
                   1581: '
                   1582: '
                   1583: 
                   1584: SUB XSetEditText (stEditCaption$, stEditText$) STATIC
                   1585: 
                   1586:     XEditTextExists stEditCaption$
                   1587:     WEditSetText stEditCaption$, stEditText$
                   1588: 
                   1589: END SUB
                   1590: 
                   1591: 
                   1592: 
                   1593: 
                   1594: 
                   1595: '       **********************************************************
                   1596: '       ************* Dialog: Option Button Subroutines ***********
                   1597: '       **********************************************************
                   1598: 
                   1599: 
                   1600: 
                   1601: '
                   1602: ' BOptionButtonExists(stOptionButton$)
                   1603: '
                   1604: ' Description:
                   1605: '       This procedure checks to see if the specified OptionButton
                   1606: '       exists or not.
                   1607: '
                   1608: ' Parameters:
                   1609: '       stOptionButton$ = OptionButton to be checked.
                   1610: '
                   1611: ' Returns:
                   1612: '       TRUE if OptionButton exists.
                   1613: '       FALSE if OptionButton does not exist.
                   1614: '
                   1615: ' Example:
                   1616: '       fExists% = BOptionButtonExists("Blue")
                   1617: '
                   1618: FUNCTION BOptionButtonExists%(stOptionButton$) STATIC
                   1619: 
                   1620:     BOptionButtonExists = WOptionExists(stOptionButton$) <> 0
                   1621: 
                   1622: END FUNCTION
                   1623: 
                   1624: 
                   1625: '
                   1626: ' XOptionButtonExists (stOptionButton$)
                   1627: '
                   1628: ' Description:
                   1629: '       Reports error if OptionButton does not exist in active window.
                   1630: '
                   1631: ' Parameters:
                   1632: '       stOptionButton$  - OptionButton to be found.
                   1633: '
                   1634: ' Returns:
                   1635: '       nothing
                   1636: '
                   1637: ' Example:
                   1638: '       XOptionButtonExists "Blue"
                   1639: '
                   1640: SUB XOptionButtonExists(stOptionButton$) STATIC
                   1641:     IF BOptionButtonExists(stOptionButton$) = 0 THEN
                   1642:         XLogFailure "OptionButton " + stOptionButton$ + " does not Exist"
                   1643:     END IF
                   1644: END SUB
                   1645: 
                   1646: 
                   1647: '
                   1648: ' XOptionButtonNotExists (stOptionButton$)
                   1649: '
                   1650: ' Description:
                   1651: '       Reports error if OptionButton Exists in active window.
                   1652: '
                   1653: ' Parameters:
                   1654: '       stOptionButton$  - OptionButton to not be found.
                   1655: '
                   1656: ' Returns:
                   1657: '       nothing
                   1658: '
                   1659: ' Example:
                   1660: '       XOptionButtonNotExists "Blue"
                   1661: '
                   1662: SUB XOptionButtonNotExists(stOptionButton$) STATIC
                   1663:     IF BOptionButtonExists(stOptionButton$) THEN
                   1664:         XLogFailure "OptionButton " + stOptionButton$ + " Exists"
                   1665:     END IF
                   1666: END SUB
                   1667: 
                   1668: 
                   1669: '
                   1670: ' BOptionButtonEnabled(stOptionButton$)
                   1671: '
                   1672: ' Description:
                   1673: '       This procedure checks to see if the specified OptionButton
                   1674: '       is enabled or not.
                   1675: '
                   1676: ' Parameters:
                   1677: '       stOptionButton$ = OptionButton to be checked.
                   1678: '
                   1679: ' Returns:
                   1680: '       TRUE if OptionButton enabled.
                   1681: '       FALSE if OptionButton not enabled.
                   1682: '
                   1683: ' Example:
                   1684: '       fEnabled% = BOptionButtonEnabled("Blue")
                   1685: '
                   1686: FUNCTION BOptionButtonEnabled%(stOptionButton$) STATIC
                   1687:     BOptionButtonEnabled = WOptionEnabled(stOptionButton$) <> 0
                   1688: END FUNCTION
                   1689: 
                   1690: 
                   1691: '
                   1692: ' XOptionButtonEnabled (stOptionButton$)
                   1693: '
                   1694: ' Description:
                   1695: '       Reports error if OptionButton is not Enabled.
                   1696: '
                   1697: ' Parameters:
                   1698: '       stOptionButton$  - OptionButton to be checked.
                   1699: '
                   1700: ' Returns:
                   1701: '       nothing
                   1702: '
                   1703: ' Example:
                   1704: '       XOptionButtonEnabled "Blue"
                   1705: '
                   1706: SUB XOptionButtonEnabled(stOptionButton$) STATIC
                   1707:     XOptionButtonExists stOptionButton$
                   1708:     IF BOptionButtonEnabled(stOptionButton$) = 0 THEN
                   1709:         XLogFailure "OptionButton " + stOptionButton$ + " is not Enabled"
                   1710:     END IF
                   1711: END SUB
                   1712: 
                   1713: 
                   1714: '
                   1715: ' XOptionButtonNotEnabled (stOptionButton$)
                   1716: '
                   1717: ' Description:
                   1718: '       Reports error if OptionButton is Enabled.
                   1719: '
                   1720: ' Parameters:
                   1721: '       stOptionButton$  - OptionButton to be checked.
                   1722: '
                   1723: ' Returns:
                   1724: '       nothing
                   1725: '
                   1726: ' Example:
                   1727: '       XOptionButtonNotEnabled "Blue"
                   1728: '
                   1729: '
                   1730: SUB XOptionButtonNotEnabled(stOptionButton$) STATIC
                   1731:     XOptionButtonExists stOptionButton$
                   1732:     IF BOptionButtonEnabled(stOptionButton$) THEN
                   1733:         XLogFailure "OptionButton " + stOptionButton$ + " Enabled"
                   1734:     END IF
                   1735: END SUB
                   1736: 
                   1737: '
                   1738: ' BOptionButtonChecked(stOptionButton$)
                   1739: '
                   1740: ' Description:
                   1741: '       This procedure checks to see if the specified OptionButton
                   1742: '       is Checked or not.
                   1743: '
                   1744: ' Parameters:
                   1745: '       stOptionButton$ = OptionButton to be checked.
                   1746: '
                   1747: ' Returns:
                   1748: '       TRUE if OptionButton Checked.
                   1749: '       FALSE if OptionButton not Checked.
                   1750: '
                   1751: ' Example:
                   1752: '       fChecked% = BOptionButtonChecked("Blue")
                   1753: '
                   1754: FUNCTION BOptionButtonChecked%(stOptionButton$) STATIC
                   1755: 
                   1756:     BOptionButtonChecked = WOptionState(stOptionButton$) <> 0
                   1757: 
                   1758: END FUNCTION
                   1759: 
                   1760: 
                   1761: '
                   1762: ' XOptionButtonChecked (stOptionButton$)
                   1763: '
                   1764: ' Description:
                   1765: '       Reports error if OptionButton is not Checked.
                   1766: '
                   1767: ' Parameters:
                   1768: '       stOptionButton$  - OptionButton to be checked.
                   1769: '
                   1770: ' Returns:
                   1771: '       nothing
                   1772: '
                   1773: ' Example:
                   1774: '       XOptionButtonChecked "Blue"
                   1775: '
                   1776: SUB XOptionButtonChecked(stOptionButton$) STATIC
                   1777:     XOptionButtonExists stOptionButton$
                   1778:     IF BOptionButtonChecked(stOptionButton$) = 0 THEN
                   1779:         XLogFailure "OptionButton " + stOptionButton$ + " is not Checked"
                   1780:     END IF
                   1781: END SUB
                   1782: 
                   1783: 
                   1784: '
                   1785: ' XOptionButtonNotChecked (stOptionButton$)
                   1786: '
                   1787: ' Description:
                   1788: '       Reports error if OptionButton is Checked.
                   1789: '
                   1790: ' Parameters:
                   1791: '       stOptionButton$  - OptionButton to be checked.
                   1792: '
                   1793: ' Returns:
                   1794: '       nothing
                   1795: '
                   1796: ' Example:
                   1797: '       XOptionButtonNotChecked "Blue"
                   1798: '
                   1799: '
                   1800: SUB XOptionButtonNotChecked(stOptionButton$) STATIC
                   1801:     XOptionButtonExists stOptionButton$
                   1802:     IF BOptionButtonChecked(stOptionButton$) THEN
                   1803:         XLogFailure "OptionButton " + stOptionButton$ + " Checked"
                   1804:     END IF
                   1805: END SUB
                   1806: 
                   1807: 
                   1808: '
                   1809: ' XClickOptionButton(stOptionButton$)
                   1810: '
                   1811: ' Description:
                   1812: '       This procedure clicks the specified OptionButton in the
                   1813: '       currently active window.
                   1814: '
                   1815: ' Parameters:
                   1816: '       stOptionButton$ = OptionButton to be clicked.
                   1817: '
                   1818: ' Returns:
                   1819: '       nothing
                   1820: '
                   1821: ' Example:
                   1822: '       XClickOptionButton "Blue"
                   1823: '
                   1824: SUB XClickOptionButton(stOptionButton$) STATIC
                   1825:     XOptionButtonExists stOptionButton$
                   1826:     WOptionClick stOptionButton$
                   1827: 
                   1828: END SUB

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.