->Windows95/98下,在资源管理器或Explorer中双击某个文件,只要此文件与某个程序建立了关联,则该程序将被启动并将文件打开

foreachkeyinallkeys

'第1个点在哪儿(跳过初始点)?

pos=Instr(2,key,".")

ifpos>0then

'there'sadot.Isthereanotherone?

pos2=Instr(pos+1,key,".")

ifpos2>0then

'yes,sothisnameisversionspecific

'checkwhetherwealreadyhavea

'version-independentprogid!

independent=left(key,pos2-1)

ifnotdict.Exists(independent)then

'no,storeit

dict.Addkey,0

endif

else

'thisoneisversion-independent.

'dowealreadyhaveaversion-dependent

'progIDinstore?

vdpid=""

foreachelementindict

iflen(element)>len(key)then

ifleft(element,len(key)+1)=key&"."then

'yes,returnname

vdpid=element

exitfor

endif

endif

next

'anyversiondependentprogIDfound?

ifvdpid=""then

'no,addtostore

dict.addkey,0

else

'yes,replace

dict.Removevdpid

dict.addkey,0

endif

endif

endif

next

MsgBoxdict.Count&"Objectsfound!"

foreachkeyindict

list=list&key&vbCrlf

next

MsgBoxlist

outputfile="C:\OBJECT.TXT"

setfs=CreateObject("Scripting.FileSystemObject")

setoutput=fs.CreateTextFile(outputfile,true)

printdict.Count&"Objectsfound!"

Printlist

output.close

wshshell.runoutputfile

subPrint(text)

'写信息到记录文件

output.WriteLinetext

endsub安装MicrosoftVisualBasic4.0后,将会有一个SetupKit工具,其所带的STKIT432.DLL文件中提供了一个API函数fCreateShellLink可供用户来为应用程序创建快捷方式

WSH支持一种叫*.wsf的文件,这个文件本身是XML格式的,通过该文件可以将你的VBScript脚本,以及其它类型的脚本,比如batch,perl等等组装在一起,交给WSH来执行

Dimh0AsInteger

'ho,mo,so为初始时间

Dimm0AsInteger

Dims0AsInteger

PrivateSubCommand5_Click()

'用鼠标单击"上一题"

IfVal(Label1.Caption)>1Then

Data1.Recordset.MovePrevious

Else

Title="提示"

msg2$="这是第一题!"

MsgBoxmsg2$,0,Title

EndIf

EndSub

PrivateSubCommand7_Click()

'用鼠标单击"下一题"

IfVal(Label1.Caption)<224Then

'一共224道题

Data1.Recordset.MoveNext

Else

Title="提示"

msg2$="这是最后一题!"

MsgBoxmsg2$,0,Title

EndIf

EndSub

PrivateSubCommand8_Click()

'用鼠标单击"确定"

ch=UCase$(Trim$(Text2.Text))

ans=UCase$(Label4.Caption)

IfStrComp(ch,ans,1)=0Then

'如果与题目的正确答案一样

Title="提示"

msg1$="你做对了!"

msg2$="这是最后一题,你做对了"

IfVal(Label1.Caption)<224Then

MsgBoxmsg1$,0,Title

Else

MsgBoxmsg2$,0,Title

Close

EndIf

Else

Title="提示"

msg1$="你做错了!"

msg2$="这是最后一题,你做错了"

IfVal(Label1.Caption)<224Then

MsgBoxmsg1$,0,Title

Else

MsgBoxmsg2$,0,Title

Close

EndIf

EndIf

Text2.Text=""

'把第二个文本框的内容变空

EndSub

PrivateSubCommand9_Click()

'用鼠标单击"答案"

an=Label4.Caption'an为题目的正确答案

jx=Label6.Caption'jx为题目的答案说明

Title="答案提示"

msg2$="本题答案为:"&an jx

MsgBoxmsg2$,0,Title

EndSub

PrivateSubForm_Load()

Open"C:\gram\gram.txt"ForBinaryAs#1

'gram.txt文件里存放了练习题的内容

filelength=LOF(1)

Iffilelength>60000Then

MsgBox"Fileistoolong",16

ExitSub

EndIf

tmp$=String$(LOF(1),0)

Get#1,,tmp$

Text1.Text=tmp$

Close#1

h0=Val(Time$)

m0=Minute(Time$)

s0=Second(Time$)

Text2.Text=""

EndSub

PrivateSubText2_Change()

Text2.Text=UCase$(Text2.Text)

'把第二个文本框里的内容变成大写

EndSub

PrivateSubTimer1_Timer()

DimggAsInteger

DimhAsInteger

DimmAsInteger

DimsAsInteger

Dimx1AsInteger

Dimx2AsInteger

h=Val(Time$)

m=Minute(Time$)

s=Second(Time$)

gg=(h-h0)*3600 (m-m0)

*60 (s-s0)

x1=Int(gg/60)

x2=(gg-(Int(gg/60))*60)

Label7.Caption=Str(x1) "分"

Str(x2) "秒"

EndSub

六:在线帮助的应用

----我们这里讲的在线帮助是指模仿Windows的在线帮助,把各种练习题或试题以及它们的答案以在线帮助的形式在屏幕上呈现出来(见图三),并非是指在程序中加一个帮助菜单来告诉学生如何使用CAI软件

'执行方法:直接双击vbs文件 或者 通过cmd.exe 下 cscript.exe "指定脚本的路径"

'利用Vbs脚本实现 显示系统服务里表

'Creator : Eric1991 Date: 2013-11-1 0:25

strComputer="."

Set objWMIService=GetObject("winmgmts:" & "\" & strComputer & "\root\cimv2")

Set colServices=objWMIService.ExecQuery("Select * from Win32_Service")

For Each objService in colServices

Wscript.Echo objService.DisplayName & "|" & objService.State

Next

生活采集Point方法返回图片框控件里指定X,Y坐标处的颜色

Function fDecode(sStringToDecode)

'This function will decode a Base64 encoded string and returns the decoded string.

'This becomes usefull when attempting to hide passwords from prying eyes.

Const CharList="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

Dim iDataLength, sOutputString, iGroupInitialCharacter

sStringToDecode=Replace(Replace(Replace(sStringToDecode, vbCrLf, ""), vbTab, ""), " ", "")

iDataLength=Len(sStringToDecode)

If iDataLength Mod 4 <> 0 Then

fDecode="Bad string passed to fDecode() function."

Exit Function

End If

For iGroupInitialCharacter=1 To iDataLength Step 4

Dim iDataByteCount, iCharacterCounter, sCharacter, iData, iGroup, sPreliminaryOutString

iDataByteCount=3

iGroup=0

For iCharacterCounter=0 To 3

sCharacter=Mid(sStringToDecode, iGroupInitialCharacter + iCharacterCounter, 1)

If sCharacter="=" Then

iDataByteCount=iDataByteCount - 1

iData=0

Else

iData=InStr(1, CharList, sCharacter, 0) - 1

If iData=-1 Then

fDecode="Bad string passed to fDecode() function."

Exit Function

End If

End If

iGroup=64 * iGroup + iData

Next

iGroup=Hex(iGroup)

iGroup=String(6 - Len(iGroup), "0") & iGroup

sPreliminaryOutString=Chr(CByte("&H" & Mid(iGroup, 1, 2))) & Chr(CByte("&H" & Mid(iGroup, 3, 2))) & Chr(CByte("&H" & Mid(iGroup, 5, 2)))

sOutputString=sOutputString & Left(sPreliminaryOutString, iDataByteCount)

Next

fDecode=sOutputString

End Function

msgbox fDecode("d3d3LmpiNTEubmV0")

网站地图 | Tag标签 | RSS订阅

Copyright © 2012-2019 脚本之家 All Rights Reserved

脚本之家  渝ICP备13030612号

征途LINUX服务端脚本,bat脚本实例征途夜行相关推荐

  1. NPS内网穿透服务端一键安装脚本

    NPS内网穿透服务端一键安装脚本,支持安装,更新,卸载以及重新生成配置文件,基于官方GitHub制作,自动安装最新版本 作者博客链接 脚本概览 安装 wget https://content.928w ...

  2. 【罗开传奇】传奇服务端调整人物属性脚本命令ChangeHumAbility

    [罗开传奇]传奇服务端调整人物属性脚本命令ChangeHumAbility 功能: 调整人物属性 格式: ChangeHumAbility 属性(1-20) 操作符(+ = -) 效果(1-65535 ...

  3. 传奇服务端常见gameofblue脚本命令代码详解

    传奇服务端常见gameofblue脚本命令代码详解 gameofblue脚本命令详解 [@段] ;段用英文或数字表示 goto @段 ;跳转到指定段,开始执行相当于B中的goto语句 #say 语句 ...

  4. 天龙八部服务器列表文件,天龙八部服务端server目录脚本说明.doc

    文档介绍: 天龙八部服务端 server 目录脚本说明天龙八部服务端 Server 目录脚本功能说明: /Server/Config Account.txt 测试帐号/Server/Config Al ...

  5. 天龙八部服务器列表文件,天龙八部服务端Server目录脚本功能说明

    天龙八部服务端Server目录脚本功能说明 本文出处:网游动力作者:本站发布时间:2008-11-06阅读次数: tlbbServerConfigNotifyDate.txt 公告 tlbbServe ...

  6. (Frp第一篇)Frp内网穿透安装教程#Frps服务端一键安装脚本#

    系统:CentOS7 内存:1G CPU:单核1G 客户端安装教程:(Frp第二篇)Frp内网穿透安装教程#Frp OpenWrt客户端安装#图形化管理 注意事项:记得给使用的端口开放防火墙,开放防火 ...

  7. linux服务端搭配win7客户端的frp

    下载frp 从https://github.com/fatedier/frp/releases 下载最新版本的frp压缩包.因为是两种系统,所以把linux和windows的版本都下载了一份. lin ...

  8. windows 下frp服务启动_内网穿透frp linux服务端搭建和windows客户端使用

    一.Linux 服务端搭建 1.下载安装 wget --no-check-certificate https://raw.githubusercontent.com/clangcn/onekey-in ...

  9. 冒险岛linux服务端 143端

    更新版本 冒险岛服务端 143 端 请在linux(ubuntu ContOs)上使用 使用前先转移数据库(如何转移?) 请看:https://blog.csdn.net/qq_31392539/ar ...

最新文章

  1. jQuery九类选择器
  2. 神了!React VR使得Oculus Home在Gear VR上运行更快更省电
  3. 程序员深夜用Python跑神经网络,只为用中二动作关掉台灯
  4. access 导入 txt sql语句_[内附完整源码和文档] 基于C#和Access的智能聊天机器人
  5. 实例62:python
  6. 发布-订阅消息常用通信方式
  7. TensorFlow(4)-TFRecord
  8. 原来它一直在“装嫩”|“心电图”揭秘富锂巨星真实年龄
  9. 自己总结的前端面试题
  10. 抢占朋友圈C位 闪耀世界杯 就要Pick 腾讯云CDN
  11. Vue Cli 3代理配置
  12. windows关闭端口方法
  13. 使用动软.net代码生成器生成数据库文档
  14. MEMS激光雷达监测法兰克福机场客流量应用案例
  15. 计算机专业选什么笔记本cpu,笔记本电脑什么配置好?来看看这款硬核办公本
  16. 卫星ku波段为何优先使用垂直极化波
  17. 基于AVX256指令集和多线程优化的双机计算加速程序
  18. 【LSTM时间序列数据】基于matlab LSTM时间序列数据预测【含Matlab源码 1949期】
  19. UE4中部分物理概念的单位
  20. 常见电子元件的认识和作用

热门文章

  1. 【Vue】Vue入门 -(本地篇+网络篇)代码示例及运行效果
  2. C# int.Parse()与int.TryParse():将字符串转化为整数
  3. java ehcahce刷新_Spring整合ehcache 注解实现查询缓存,并实现实时缓存更新或删除...
  4. mysql开启事务_MySQL入门之事务(上)
  5. mavenspringboot配置不同profile环境
  6. 使用Introspector(Java内省机制)实现Map转换为JavaBean
  7. 内存泄漏(OOM)产生原因
  8. Codeup墓地-问题 A: 还是畅通工程
  9. 【简洁代码】1061 判断题 (15分)_18行代码AC
  10. 【传智播客】Javaweb程序设计任务教程 黑马程序员 第五章 课后答案