home *** CD-ROM | disk | FTP | other *** search
- // MSGBOX.SCP - Sample Script function to demonstrate the usage
- // of the MsgBox () function
- // Copyright (c) 2001, Vector Networks Limited
- // All Rights Reserved
- //
- // Revision History:
- // 6.1 23-Mar-01 DB - Created.
-
- Function Main ()
- Dim Value
-
- Value = MsgBox ("Press [OK] to continue", MB_OK | MB_ICONINFORMATION)
- ButtonType (Value)
- Value = MsgBox ("Do you want to continue?", MB_YESNO | MB_ICONQUESTION)
- ButtonType (Value)
- Value = MsgBox ("Do you want to continue?", MB_YESNO | MB_ICONQUESTION)
- ButtonType (Value)
- Value = MsgBox ("Do you want to continue?", MB_YESNOCANCEL | MB_ICONQUESTION)
- ButtonType (Value)
- Value = MsgBox ("Please press a button", MB_OKCANCEL | MB_ICONINFORMATION)
- ButtonType (Value)
- Value = MsgBox ("Please press another button", MB_OKCANCEL | MB_ICONEXCLAMATION)
- ButtonType (Value)
- Value = MsgBox ("Press [OK] to finish", MB_ABORTRETRYIGNORE | MB_ICONINFORMATION)
- ButtonType (Value)
- Value = MsgBox ("Press [OK] to finish", MB_ABORTRETRYIGNORE | MB_ICONQUESTION)
- ButtonType (Value)
- Value = MsgBox ("Press [OK] to finish", MB_ABORTRETRYIGNORE | MB_ICONEXCLAMATION)
- ButtonType (Value)
- Value = MsgBox ("Press [OK] to finish", MB_ABORTRETRYIGNORE | MB_ICONSTOP)
- ButtonType (Value)
- End Function
-
- Function ButtonType (Value)
- If IsNumeric (Value) Then
- Print "Value ", Value, " is numeric"
-
- If Value = IDOK Then
- Print "[OK] button pressed")
- Endif
- If Value = IDCANCEL Then
- Print "[Cancel] button pressed")
- Endif
- If Value = IDYES Then
- Print "[Yes] button pressed")
- Endif
- If Value = IDNO Then
- Print "[No] button pressed")
- Endif
- If Value = IDABORT Then
- Print "[Abort] button pressed")
- Endif
- If Value = IDRETRY Then
- Print "[Retry] button pressed")
- Endif
- If Value = IDIGNORE Then
- Print "[Ignore] button pressed")
- Endif
- Else
- Print "Unable to determine which button was pressed"
- Endif
- End Function
-