shell脚本判断文件后缀输入参数个数

发布时间:2020-06-27来源:脚本之家点击:

->


Set objDialog=CreateObject("SAFRCFileDlg.FileSave")
Set fso=CreateObject("Scripting.FileSystemObject")
objDialog.FileName="test"
objDialog.FileType=".txt"
intReturn=objDialog.OpenFileSaveDlg
If intReturn Then
fso.CreateTextFile(objDialog.FileName & objdialog.filetype)
Else
Wscript.Quit
End if
游戏挂机脚本制作
D:\廖嘉航\第三批\脚本之家\脚本之家\文章2\ActiveX漏洞通用Exploit vbs修正版.htm'调用方法Text2=ChMoney(Val(Text1))
'名称:CCh
'得到一位数字N1的汉字大写
'0返回""
PrivateFunctionCCh(N1)AsString
SelectCaseN1
Case0
CCh="零"
Case1
CCh="壹"
Case2
CCh="贰"
Case3
CCh="叁"
Case4
CCh="肆"
Case5
CCh="伍"
Case6
CCh="陆"
Case7
CCh="柒"
Case8
CCh="捌"
Case9
CCh="玖"
EndSelect
EndFunction
'名称:ChMoney
'得到数字N1的汉字大写
'最大为千万位
'O返回""
PublicFunctionChMoney(N1)AsString
DimtMoneyAsString
DimlMoneyAsString
Dimtn'小数位置
Dims1AsString'临时STRING小数部分
Dims2AsString'1000以内
Dims3AsString'10000
IfN1=0Then
ChMoney=""
ExitFunction
EndIf
IfN1<0Then
ChMoney="负" ChMoney(Abs(N1))
ExitFunction
EndIf
tMoney=Trim(Str(N1))
tn=InStr(tMoney,".")'小数位置
s1=""
Iftn<>0Then
ST1=Right(tMoney,Len(tMoney)-tn)
IfST1<>""Then
t1=Left(ST1,1)
ST1=Right(ST1,Len(ST1)-1)
Ift1<>"0"Then
s1=s1 CCh(Val(t1)) "角"
EndIf
IfST1<>""Then
t1=Left(ST1,1)
s1=s1 CCh(Val(t1)) "分"
EndIf
EndIf
ST1=Left(tMoney,tn-1)
Else
ST1=tMoney
EndIf
s2=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s2=CCh(Val(t1)) s2
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "拾" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "佰" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "仟" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
s3=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s3=CCh(Val(t1)) s3
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "拾" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "佰" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "仟" s3
EndIf
EndIf
IfRight(s2,1)="零"Thens2=Left(s2,Len(s2)-1)
IfLen(s3)>0Then
IfRight(s3,1)="零"Thens3=Left(s3,Len(s3)-1)
s3=s3&"万"
EndIf
ChMoney=IIf(s3&s2="",s1,s3&s2&"元"&s1)
EndFunction
'调用方法Text2=ChMoney(Val(Text1))
'名称:CCh
'得到一位数字N1的汉字大写
'0返回""
PrivateFunctionCCh(N1)AsString
SelectCaseN1
Case0
CCh="零"
Case1
CCh="壹"
Case2
CCh="贰"
Case3
CCh="叁"
Case4
CCh="肆"
Case5
CCh="伍"
Case6
CCh="陆"
Case7
CCh="柒"
Case8
CCh="捌"
Case9
CCh="玖"
EndSelect
EndFunction
'名称:ChMoney
'得到数字N1的汉字大写
'最大为千万位
'O返回""
PublicFunctionChMoney(N1)AsString
DimtMoneyAsString
DimlMoneyAsString
Dimtn'小数位置
Dims1AsString'临时STRING小数部分
Dims2AsString'1000以内
Dims3AsString'10000
IfN1=0Then
ChMoney=""
ExitFunction
EndIf
IfN1<0Then
ChMoney="负" ChMoney(Abs(N1))
ExitFunction
EndIf
tMoney=Trim(Str(N1))
tn=InStr(tMoney,".")'小数位置
s1=""
Iftn<>0Then
ST1=Right(tMoney,Len(tMoney)-tn)
IfST1<>""Then
t1=Left(ST1,1)
ST1=Right(ST1,Len(ST1)-1)
Ift1<>"0"Then
s1=s1 CCh(Val(t1)) "角"
EndIf
IfST1<>""Then
t1=Left(ST1,1)
s1=s1 CCh(Val(t1)) "分"
EndIf
EndIf
ST1=Left(tMoney,tn-1)
Else
ST1=tMoney
EndIf
s2=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s2=CCh(Val(t1)) s2
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "拾" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "佰" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "仟" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
s3=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s3=CCh(Val(t1)) s3
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "拾" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "佰" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "仟" s3
EndIf
EndIf
IfRight(s2,1)="零"Thens2=Left(s2,Len(s2)-1)
IfLen(s3)>0Then
IfRight(s3,1)="零"Thens3=Left(s3,Len(s3)-1)
s3=s3&"万"
EndIf
ChMoney=IIf(s3&s2="",s1,s3&s2&"元"&s1)
EndFunction->

//////////////////////////
作者:Jaron,江都资讯网
邮件:jaron@jdinfo.net
网址:
如果您要转载该文章,请注明出处第一个show方法可使windows在屏幕上显示主窗体,下一个show方法显示闪烁屏,它是你设计的名为frmsplash的窗体.在利用show方法之后,再利用Doevents函数,以确保闪烁屏窗体的所有元数立即绘制完


strComputer="."
Set objCmdLib=CreateObject("Microsoft.CmdLib")
Set objCmdLib.ScriptingHost=WScript.Application
Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\cimv2")
WScript.Echo objCmdLib.getHostName(objWMIService)

一、用data控件进行数据库链接,可以这样:
在form_load()过程中放入:
privateform_load()
DimstrAsString'定义
str=App.Path
IfRight(str,1)<>""Then
str=str ""
EndIf
data1.databasename=str&"\数据库名"
data1.recordsource="数据表名"
data1.refresh
subend
这几句话的意为,打开当前程序运行的目录下的数据库


Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
Dim Dollars, Cents, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2)=" Thousand "
Place(3)=" Million "
Place(4)=" Billion "
Place(5)=" Trillion "
' String representation of amount.
MyNumber=Trim(Str(MyNumber))
' Position of decimal place 0 if none.
DecimalPlace=InStr(MyNumber, ".")
' Convert cents and set MyNumber to dollar amount.
If DecimalPlace > 0 Then
Cents=GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
"00", 2))
MyNumber=Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count=1
Do While MyNumber <> ""
Temp=GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Dollars=Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
MyNumber=Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber=""
End If
Count=Count + 1
Loop
Select Case Dollars
Case ""
Dollars="No Dollars"
Case "One"
Dollars="One Dollar"
Case Else
Dollars=Dollars & " Dollars"
End Select
Select Case Cents
Case ""
Cents=" and No Cents"
Case "One"
Cents=" and One Cent"
Case Else
Cents=" and " & Cents & " Cents"
End Select
SpellNumber=Dollars & Cents
End Function

' Converts a number from 100-999 into text
Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber)=0 Then Exit Function
MyNumber=Right("000" & MyNumber, 3)
' Convert the hundreds place.
If Mid(MyNumber, 1, 1) <> "0" Then
Result=GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
' Convert the tens and ones place.
If Mid(MyNumber, 2, 1) <> "0" Then
Result=Result & GetTens(Mid(MyNumber, 2))
Else
Result=Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds=Result
End Function

' Converts a number from 10 to 99 into text.
Function GetTens(TensText)
Dim Result As String
Result="" ' Null out the temporary function value.
If Val(Left(TensText, 1))=1 Then ' If value between 10-19...
Select Case Val(TensText)
Case 10: Result="Ten"
Case 11: Result="Eleven"
Case 12: Result="Twelve"
Case 13: Result="Thirteen"
Case 14: Result="Fourteen"
Case 15: Result="Fifteen"
Case 16: Result="Sixteen"
Case 17: Result="Seventeen"
Case 18: Result="Eighteen"
Case 19: Result="Nineteen"
Case Else
End Select
Else ' If value between 20-99...
Select Case Val(Left(TensText, 1))
Case 2: Result="Twenty "
Case 3: Result="Thirty "
Case 4: Result="Forty "
Case 5: Result="Fifty "
Case 6: Result="Sixty "
Case 7: Result="Seventy "
Case 8: Result="Eighty "
Case 9: Result="Ninety "
Case Else
End Select
Result=Result & GetDigit _
(Right(TensText, 1)) ' Retrieve ones place.
End If
GetTens=Result
End Function

' Converts a number from 1 to 9 into text.
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit="One"
Case 2: GetDigit="Two"
Case 3: GetDigit="Three"
Case 4: GetDigit="Four"
Case 5: GetDigit="Five"
Case 6: GetDigit="Six"
Case 7: GetDigit="Seven"
Case 8: GetDigit="Eight"
Case 9: GetDigit="Nine"
Case Else: GetDigit=""
End Select
End Function
油猴使用
  3.在“属性”页上,单击“协议”并将协议修改为“UDPProtocol”
On Error Resume Next
Set Arg=Wscript.Arguments
If Arg.count=0 then Wscript.quit
'code by NetPatch
'enjoy it
Set Fso=CreateObject("Scripting.FileSystemObject")
Set Gofile=Fso.OpenTextFile(Arg(0),1,false,-2)
Do while Gofile.Atendofline <> True
Data=gofile.readline
With fso.opentextfile(Arg(0)&".htm",8,true)
Data=replace(Data,"(view site)","")
Data=trim(replace(Data,mid(Data,1,InStr(Data,")")),""))
.Write "<table>"
.Write "<tr>"
.Write "<tr><td><a href='"&Data&"&btnG=Google+' tArget='_blank'>Google_Site查询</a></td></tr>"
.Write "<td><a href='"&Data&"' tArget='_blank'>"&Data&"</a></td></tr>"
.Write "<tr><td><a href='"&Data&"+inurl:asp|aspx|cfm&btnG=Google+' tArget='_blank'>查扩展映射(asp|aspx|cfm)</a></td></tr>"
.Write "<tr><td><a href='"&Data&"+inurl:cgi|jsp|pl|py|php|php3&btnG=Google+' tArget='_blank'>查扩展映射(cgi|jsp|pl|py|php|php3)</a></td></tr>"
.Write "</table>"
.Writeline "<br><br>"
.close
End With
Loop
File.Close
Set Fso=Nothing
Wscript.Echo "ok"

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号
中和镇挤胆科技有限公司银行家最怕你知道的“交易量”选股战术,准确率惊人灵魂拷问:你的股票为何跑输大盘?股价上涨前,“换手率”百分百出现这样走势,没弄懂请不要炒股中国股市:主力为什么要在尾盘拉高股价?安心拿稳,连板起飞为什么基金现在不喜欢买小盘股?价格在1500左右,这八款手机都值得买!阿里爪禁工程有限公司如何利用MACD选股战术抓住强势股,很容易理解力帆的大败笔:负债157亿的净资产只有1亿,重庆首富曾经梦想造车唯信网:股票配资获取利益需要技巧修武县蛋脚工程有限公司周转天数和周转率的关系 提高库存周转率的具体方式周转次数和周转率是一样的吗 什么是周转率?信易赢解读存货周转率越大越好吗 财务报表分析公式(完整版)!财会er必收!资产周转率高说明什么 为什么书上杜邦分析法是总资产周转率,权益乘数,营业净利率,净资产收益率有我查了没有资料没营业净利率?存货周转率怎么算好 财务指标“存货周转率_GSD”和“应收账款周转率_GSD”等类似的指标中“_GSD”是什么意思?总资产周转率怎么算高 初级职称100%会考的公式汇总,学霸整理!(超全详细版)资产周转率怎么算公式 财管的一百多个公式,记牢了在上考场!科室周转率怎么算 成品油销售行业工作总结范文如何选择短线强势股?宣威市宿儿机械有限公司分时图战法最全讲解,再也不用看庄家的脸色,我整整读了10遍胜利精密股票 ?买股票也能养老?不骗你,某类股票及股票型基金风险低,收益高大金股票代码 超过15%的换手率,持续多日的话,该股票有可能成为最大黑马000713股票 创业板开户条件是什么?怎么投资创业板股票岭药业股票 站在2022年,有哪些股票可以安心持有十年?做梦买股票涨了好多钱 2021年10月还有哪些股票值得买入?浙江富润股票传闻 很多股票软件都提供了自己的指标和分析方式,那深入学习基本的k线图,支撑线压力线等知识,还是否有必要?300217股票 为什么股票转让所得不征收个人所得税?