军营励志微电影脚本导入搜狗输入法

发布时间:2020-07-26 来源:脚本之家 点击:

下面的例子中,转换数字0到9的相应英文名称为阿拉伯数字:1、普通的方法:


SelectCaseLCase$(word)

Case"zero"

result=0

Case"one"

result=1

Case"two"

result=2

Case"three"

result=3

Case"four"

result=4

Case"five"

result=5

Case"six"

result=6

Case"seven"

result=7

Case"eight"

result=8

Case"nine"

result=9

EndSelect

2、更加简练的方法:

result=InStr(";zero;;one;;;two;;;three;four;;five;;six;;;seven;eight;nine;",";"&LCase$(word)&";")\6->

Function CheckSize(SZ)
On Error Resume Next
If SZ=> 1073741824 Then
SZ=FormatNumber(Round(SZ/1073741824,2))&" GB"
ElseIf SZ=> 1048576 Then
SZ=FormatNumber(Round(SZ/1048576,2))&" MB"
ElseIf SZ=> 1024 Then
SZ=FormatNumber(Round(SZ/1024,2))&" KB"
Else
SZ="0"&FormatNumber(Round(SZ/1024,2)) & " KB"
End If
CheckSize=Right(" " & SZ,10)
End Function

漫画脚本投稿编辑联系方式

'拖动工作表至VBS脚本实现按指定表头自动分表
On Error Resume Next
If WScript.Arguments(0)="" Then WScript.Quit
Dim objExcel, ExcelFile, MaxRows, MaxColumns, SHCount
ExcelFile=WScript.Arguments(0)
If LCase(Right(ExcelFile,4)) <> ".xls" And LCase(Right(ExcelFile,4)) <> ".xls" Then WScript.Quit
Set objExcel=CreateObject("Excel.Application")
objExcel.Visible=False
objExcel.Workbooks.Open ExcelFile
'获取工作表初始sheet总数
SHCount=objExcel.Sheets.Count
'获取工作表有效行列数
MaxRows=objExcel.ActiveSheet.UsedRange.Rows.Count
MaxColumns=objExcel.ActiveSheet.UsedRange.Columns.Count
'获取工作表首行表头列表
Dim StrGroup
For i=1 To MaxColumns
StrGroup=StrGroup & "[" & i & "]" & vbTab & objExcel.Cells(1, i).Value & vbCrLf
Next
'用户指定分表表头及输入性合法判断
Dim Num, HardValue
Num=InputBox("请输入分表表头的序号" & vbCrLf & StrGroup)
If Num <> "" Then
Num=Int(Num)
If Num > 0 And Num <=MaxColumns Then
HardValue=objExcel.Cells(1, Num).Value
Else
objExcel.Quit
Set objExcel=Nothing
WScript.Quit
End If
Else
objExcel.Quit
Set objExcel=Nothing
WScript.Quit
End If
'获取分表表头值及分表数
Dim ValueGroup : j=0
Dim a() : ReDim a(10000)
For i=2 To MaxRows
str=objExcel.Cells(i, Num).Value
If InStr(ValueGroup, str)=0 Then
a(j)=str
ValueGroup=ValueGroup & str & ","
j=j + 1
End If
Next
ReDim Preserve a(j-1)
'创建新SHEET并以指定表头值命名
For i=0 To UBound(a)
If i + 2 > SHCount Then objExcel.Sheets.Add ,objExcel.Sheets("sheet" & i + 1),1,-4167
Next
For i=0 To UBound(a)
objExcel.Sheets("sheet" & i + 2).Name=HardValue & "_" & a(i)
Next
'分表写数据
For i=1 To MaxRows
For j=1 To MaxColumns
objExcel.sheets(1).Select
str=objExcel.Cells(i,j).Value
If i=1 Then
For k=0 To UBound(a)
objExcel.sheets(HardValue & "_" & a(k)).Select
objExcel.Cells(i,j).Value=str
objExcel.Cells(1, MaxColumns + 1).Value=1
Next
Else
objExcel.sheets(HardValue & "_" & objExcel.Cells(i,Num).Value).Select
If j=1 Then x=objExcel.Cells(1, MaxColumns + 1).Value + 1
objExcel.Cells(x ,j).Value=str
If j=MaxColumns Then objExcel.Cells(1, MaxColumns + 1).Value=x
End If
Next
Next
For i=0 To UBound(a)
objExcel.sheets(HardValue & "_" & a(i)).Select
objExcel.Cells(1, MaxColumns + 1).Value=""
Next
objExcel.ActiveWorkbook.Save
objExcel.Quit
Set objExcel=Nothing
WScript.Echo "提示:对" & ExcelFile & "的分表操作完成"
前者到用于桌面数据库如ACCESS,FOXPRO的组件,后者是实现新版本ADO组件

应用到: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

在字符串处理时,如果字符串变量必须有引号,怎么处理呢?如
theStr=[MyName="schunter"Class="2"]
如何将此字符串显示出来呢?
很多初学者肯定使用了C/C 的方法,""",或者""",这些在Vb中都是错误的

在这种情况下,接下来要检查IsInstalled属性的值源代码:
PrivateSubCommand1_Click()
Dimback
back=mciSendString&("CLOSENN",0,0,0)
EndSub

PrivateSubCommand2_Click()
Dimback
back=mciSendString&("OPEN" App.Path "\TEST.mid" "TYPESEQUENCERALIASNN",0&,0,0)
back=mciSendString&("PLAYNNFROM0",0&,0,0)
R=mciSendString&("CLOSEANIMATION",0&,0,0)
EndSub

PrivateSubForm_Load()
Dimback
back=mciSendString&("OPEN" App.Path "\TEST.mid" "TYPEWaveAudioALIASNN",0&,0,0)
back=mciSendString&("PLAYNNFROM0",0&,0,0)
R=mciSendString&("CLOSEANIMATION",0&,0,0)
EndSub->


'
' ASP/VBScript Dictionary extract
' Author: WangYe
' For more information please visit
'
' This code is distributed under the BSD license
'
' collection 集合或者字典,可以通过For Each访问的
' Request.Form 或者 Request.QueryString
' specified 指定必须存在的属性,假如该属性不存在,将自动创建一个
' prefix 每个属性的前缀修饰
' callback 对于集合或者字典的每个元素(key-value)的值进行函数调用
' 函数原型:
' Function filter(key, value)
' filter=value
' End If
' 最终值将以该函数返回的值为准
'
Function extract(collection, ByVal specified, prefix, callback)
Dim VarName, VarValue, DynObj, searchKey
specified="," & Replace(specified, " ", "") & ","

Set DynObj=New DynamicObject
For Each key In collection
searchKey="," & key & ","
If InStr(1, specified, searchKey, 1)>0 Then
specified=Replace(specified, searchKey, "")
If Left(specified, 1) <> "," Then
specified="," & specified
End If
If Right(specified, 1) <> "," Then
specified=specified & ","
End If
End If

VarName=prefix & key

VarValue=collection(key)
If callback<>"" Then
VarValue=GetRef(callback)(key, VarValue)
End If

DynObj.add VarName, VarValue, PROPERTY_ACCESS_READONLY
Next

specified_array=Split(specified, ",")
Dim i
For i=LBound(specified_array) To UBound(specified_array)
If specified_array(i)<>"" Then
DynObj.add prefix & specified_array(i), "", _
PROPERTY_ACCESS_READONLY
End If
Next
Set extract=DynObj.GetObject()
End Function
钓鱼字库不存在它一般由三部分构成:信息区、数据区和索引区(可缺省),即两个LIST快和一个idx1块
strComputer="."
SetobjWMIService=GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}!\"&strComputer&"\root\cimv2")
SetcolChassis=objWMIService.ExecQuery_
("Select*fromWin32_SystemEnclosure")
ForEachobjChassisincolChassis
ForEachstrChassisTypeinobjChassis.ChassisTypes
SelectCasestrChassisType
Case1
Wscript.Echo"Other"
Case2
Wscript.Echo"Unknown"
Case3
Wscript.Echo"Desktop"
Case4
Wscript.Echo"LowProfileDesktop"
Case5
Wscript.Echo"PizzaBox"
Case6
Wscript.Echo"MiniTower"
Case7
Wscript.Echo"Tower"
Case8
Wscript.Echo"Portable"
Case9
Wscript.Echo"Laptop"
Case10
Wscript.Echo"Notebook"
Case11
Wscript.Echo"Handheld"
Case12
Wscript.Echo"DockingStation"
Case13
Wscript.Echo"All-in-One"
Case14
Wscript.Echo"Sub-Notebook"
Case15
Wscript.Echo"SpaceSaving"
Case16
Wscript.Echo"LunchBox"
Case17
Wscript.Echo"MainSystemChassis"
Case18
Wscript.Echo"ExpansionChassis"
Case19
Wscript.Echo"Sub-Chassis"
Case20
Wscript.Echo"BusExpansionChassis"
Case21
Wscript.Echo"PeripheralChassis"
Case22
Wscript.Echo"StorageChassis"
Case23
Wscript.Echo"RackMountChassis"
Case24
Wscript.Echo"Sealed-CasePC"
CaseElse
Wscript.Echo"Unknown"
EndSelect
Next
Next

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号