Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '-----------------------------------------------------------------
- ' Name: Menu Template Script
- ' By: Harvey Colwell
- ' CopyRight: (c) Jul 2000, All Rights Reserved!
- '
- '*****************************************************************
- Option Explicit
- Dim oFS, oWS, oWN
- Set oWS = WScript.CreateObject("WScript.Shell")
- Set oWN = WScript.CreateObject("WScript.Network")
- Set oFS = WScript.CreateObject("Scripting.FileSystemObject")
- '----------
- ' Script SetUp
- '----------
- '----------
- ' Main
- '----------
- Select Case InputBox ( _
- "Enter menu item number then Click Ok. . ." & vbCrlf & vbCrlf & _
- " [1] Item 1" & vbCrlf & _
- " [2] Item 2" & vbCrlf & _
- " [3] Item 3" & vbCrlf & _
- " [4] Item 4", _
- "Main Menu")
- Case "1"
- Call sub1()
- Case "2"
- Call sub2()
- Case "3"
- Call sub3()
- Case "4"
- Call sub4()
- Case Else
- WScript.Echo "You entered an invalid menu choice!"
- End Select
- '----------
- ' Clean Up
- '----------
- Call CleanUp
- '-----------------------------------------------------------------
- ' Subroutines
- '*****************************************************************
- '---------------------
- Sub CleanUp()
- Set oWS = Nothing
- Set oWN = Nothing
- Set oFS = Nothing
- WScript.Quit
- End Sub
- '---------------------
- Sub sub1()
- WScript.Echo "You selected Menu Item 1"
- End Sub
- '---------------------
- Sub sub2()
- WScript.Echo "You selected Menu Item 2"
- End Sub
- '---------------------
- Sub sub3()
- WScript.Echo "You selected Menu Item 3"
- End Sub
- '---------------------
- Sub sub4()
- WScript.Echo "You selected Menu Item 4"
- End Sub
- '-----------------------------------------------------------------
- ' Functions
- '*****************************************************************
- '---------------------
- '***************************************
Advertisement
Add Comment
Please, Sign In to add comment