多语言展示
当前在线:1600今日阅读:23今日分享:25

教你用vbs做一个Creeper接龙

VBScript简称VBS,是Microsoft微软开发的一门脚本语言,其目的是方便windows管理管理windows操作系统,当然,VBScript同样可以像JavaScript那样嵌入到HTML中,不可否认,它和Visual Basic(VB)是如此相似,或者说几乎一样。现在网上流行着Creeper?Awwman这样的接龙梗,有很多人说要做一个接龙的vbs,小编今天来教大家做一个自动接龙程序。
工具/原料

Windows 7,8,10

方法/步骤
2

右键刚刚新建的文档,选择“编辑”,此时蹦出一个空白的文本文档。

3

复制以下代码到空白文档里:dim creeper'新建一个变量,确认是否为指定文本 creeper=inputbox('请输入:Creeper?以开始接龙')'用刚建完的变量制造一个输入框if creeper='Creeper?' then     dim cr1     cr1=inputbox('Awwman!')'检测输入文本是否为'Creeper?'else     msgbox '接龙失败!重新再来。' end if'如果输入错误会直接关闭程序

4

此为小编没有做完的半成品,供大家参考:dim creeper creeper=inputbox('来玩接龙游戏吧!输入:Creeper?') if creeper='Creeper?' then     dim cr1     cr1=inputbox('Awwman!(首字母大写~)')     if cr1='So we back in the mine' then         dim cr2         cr2=inputbox('Got our pickaxe swinging from side to side')         if cr2='Side side to side' then             dim cr3             cr3=inputbox('This task,a grueling one')             if cr3='Hope to find some diamonds tonight,night,night' then                 dim cr4                 cr4=inputbox('Diamonds tonight')             else                 msgbox '接龙失败!重新再来。'                 end if         else             msgbox '接龙失败!重新再来。'             end if     else         msgbox '接龙失败!重新再来。'         end if else     msgbox '接龙失败!重新再来。' end if

注意事项

必须是ANSI编码,不然会改变字符

推荐信息