中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
作者:
标题: [讨论]Scripting Games 上一主题 | 下一主题
electronixtar
铂金会员





积分 7493
发帖 2672
注册 2005-9-2
状态 离线
『楼 主』:  [讨论]Scripting Games

http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true


Competitors’ Pack
http://download.microsoft.com/download/6/1/d/61d254b4-476c-48e2-a1f1-333d6e46d771/competitors_pack.exe

填空题:
i = 0
a = ______("Red","Orange","Yellow","Green","Blue","Purple")

Do ______ i = 0
    x = InputBox("Enter a color: Red, Orange, Yellow, Green, Blue, or Purple", "Color Selection")

    If x = "" Then
        Wscript.Echo "Action cancelled"
        Exit ______
    End If

    y = UCase(x)

    For Each b In a
        If ______(b) = y Then
            i = 1
        End If
    Next

    If i = 0 Then
        ______ "Invalid choice"
    Else
        Exit Do
    End If
______

______ Case y
    case "RED"
        Wscript.Echo "You entered RED"
    case "ORANGE"
        Wscript.Echo "You entered ORANGE"
    case "YELLOW"
        Wscript.Echo "You entered YELLOW"
    case "GREEN"
        Wscript.Echo "You entered GREEN"
    case "BLUE"
        Wscript.Echo "You entered BLUE"
    case "PURPLE"
        Wscript.Echo "You entered PURPLE"
End ______





C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
2007-2-18 11:48
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
slore
铂金会员





积分 5212
发帖 2478
注册 2007-2-8
状态 离线
『第 2 楼』:  

i = 0
a = Array("Red", "Orange", "Yellow", "Green", "Blue", "Purple")

Do While i = 0
    x = Inputbox("Enter a color: Red, Orange, Yellow, Green, Blue, Or Purple", "Color Selection")

    If x = "" Then
        Wscript.Echo "Action cancelled"
        Exit Do
    End If

    y = Ucase(x)

    For Each b In a
        If Ucase(b) = y Then
            i = 1
        End If
    Next

    If i = 0 Then
        Wscript.Echo "Invalid choice"
    Else
        Exit Do
    End If
Loop

Select Case y
    Case "RED"
        Wscript.Echo "You entered RED"
    Case "ORANGE"
        Wscript.Echo "You entered ORANGE"
    Case "YELLOW"
        Wscript.Echo "You entered YELLOW"
    Case "GREEN"
        Wscript.Echo "You entered GREEN"
    Case "BLUE"
        Wscript.Echo "You entered BLUE"
    Case "PURPLE"
        Wscript.Echo "You entered PURPLE"
End Select

2007-2-19 10:07
查看资料  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: