炉石传说手机脚本下载地址产前子痫抢救演练

发布时间:2019-10-26 来源:脚本之家 点击:

V

那么什么是COM对象呢?
我这样理解,COM对象就是一些具有特定函数功能项程序模块,他们一般以ocx或者dll作为扩展名,你只要找到包含有你需要的功能的模块文件,并在脚本中规范的引用,就可以实现特定的功能,也就是说Vbs脚本就是调用现成的“控件”作为对象,用对象的属性和方法实现目的,完全免去了编写代码、设计算法等等麻烦
迷你世界怎么用脚本玩
GoForward


set arg=wscript.arguments
If arg.count=0 Then
show_help()
wsh.quit
End If
Server=arg(0)
User=arg(1)
pass=arg(2)
database_name=arg(3)
table_name=arg(4)
set Conn=CreateObject("ADODB.Connection")
Conn.Open "Driver={SQL Server};Server=" & Server & ";UID=" & User & ";PWD=" & Pass & ";Database=" & database_name
Set rs=conn.execute("select count(*) as n from " & database_name & ".dbo.sysobjects where id=object_id(N'[dbo].[" & table_name & "]')")
if rs("n") <=0 Then
wsh.echo "table have?"
wsh.quit
End If
sql1="use " &database_name & ";select count(column_name) from information_schema.columns where table_name='" & table_name & "'"
set rs1=conn.execute(sql1)
num=rs1(0)
rs1.close
Set rs1=Nothing
i=1
sql2="use " &database_name & ";select column_name,data_type,IS_NULLABLE,character_octet_length,collation_name,domain_name from information_schema.columns where table_name='" & table_name & "' order by ordinal_position"
'wsh.echo sql2

set rs2=conn.execute (sql2)
wsh.echo "if exists (select * from dbo.sysobjects where id=object_id(N'[dbo].[" & table_name & "]') and OBJECTPROPERTY(id, N'IsUserTable')=1)"
wsh.echo "drop table [dbo].[" & table_name & "]"
wsh.echo "GO"
wsh.echo "CREATE TABLE [dbo].[" & table_name & "] ("
do while not rs2.eof
col_dn=rs2("domain_name")
col_name=rs2("column_name")
col_type=rs2("data_type")
col_len=rs2("character_octet_length")
col_an=rs2("collation_name")
col_is=rs2("IS_NULLABLE")
sql=chr(9)&"[" & col_name & "] "
If col_dn="id" Then
sql=sql & col_dn &" "
Else

sql=sql & "[" & col_type & "] "
If col_len <> "" Then
sql=sql & "(" & col_len & ") "
End If
If col_an <> "" Then
sql=sql & "COLLATE " & col_an
End If
End If


If col_is="No" Then
sql=sql & " NOT NULL "
Else
sql=sql & " NULL "
End If
If i=num Then
sql=sql & Chr(13)&Chr(10)&") ON [PRIMARY]"
Else
sql=sql & ","
End If
i=i +1
wsh.echo sql
rs2.movenext
loop
wsh.echo "GO"
rs2.close
Set rs2=Nothing
conn.close
Set conn=Nothing
Sub show_help()
wsh.echo "code by N37P47ch "
wsh.echo "cscript show_table.vbs ip user pass database table"
End Sub

对空投造成伤害


Option Explicit

Dim oFS : Set oFS=CreateObject( "Scripting.FileSystemObject" )
Dim oWS : Set oWS=CreateObject( "WScript.Shell" )

WScript.Echo "Script:"
WScript.Echo "ScriptFullName:", WScript.ScriptFullName
WScript.Echo "ScriptFullPath:", oFS.GetParentFolderName( WScript.ScriptFullName )
WScript.Echo "Current:"
WScript.Echo "FS:", oFS.GetAbsolutePathName( "." )
WScript.Echo "WS:", oWS.CurrentDirectory

-------- output -------------

C:\wis\_vbs\0506\dev\forum
cscript curdir.vbs
Script:
ScriptFullName: C:\wis\_vbs\0506\dev\forum\curdir.vbs
ScriptFullPath: C:\wis\_vbs\0506\dev\forum
Current:
FS: C:\wis\_vbs\0506\dev\forum
WS: C:\wis\_vbs\0506\dev\forum

C:\wis\_vbs\0506\dev\forum
cd ..

C:\wis\_vbs\0506\dev
cscript forum\curdir.vbs
Script:
ScriptFullName: C:\wis\_vbs\0506\dev\forum\curdir.vbs
ScriptFullPath: C:\wis\_vbs\0506\dev\forum
Current:
FS: C:\wis\_vbs\0506\dev
WS: C:\wis\_vbs\0506\dev
跟另外两个特殊队友互动好像不少

IhaveascriptwhereusersentersomeinformationinanInputbox.Theinformationneedstobeenteredinall-capitalletters,somyinstructionssay,“PleasemakesuretheCapsLockkeyisonbeforeenteringtheinformation.”Theydon'talwaysdothat,however.IsthereawaytoturntheCapsLockkeyonandoffusingascript?
--BW,Medford,OR
答:
Hey,BW.Wedon'tknowofawaytoturntheCapsLockkeyonandoff,butwedoknowawaytomimictheeffectofhavingtheCapsLockkeyon.Afterall,thewholepointoftheCapsLockkeyistoturneverythingyoutypeintouppercaseletters.Forexample,youmighttypethis:
thisismysentence.
ButCapsLockwillmakeitappearonscreenlikethis:
THISISMYSENTENCE.
Sohowcanweachievethesameaffectinascript?简单:wejustusetheVBScriptfunctionUCase,whichswitchesallthelettersinastringtotheiruppercaseequivalent.Forexample,here'sasimpletwo-linescriptthatgathersinformationfromauserandthenusestheUCasefunctiontoswitchalltheletterstouppercasewhenechoingthevaluetothescreen:
strMessage=InputBox("Pleaseenteryourmessage:")Wscript.EchoUCase(strMessage)
Incidentally,theabovescriptdoesn'tactuallychangethecaseofthelettersinthestringstrMessage;itjustdisplaystheminuppercase.Ifyoureallywantallthelettersconvertedtouppercase,trythisscriptinstead:
strMessage=UCase(InputBox("Pleaseenteryourmessage:"))Wscript.EchostrMessage
Lookscrazy,butitworks.
FormoreinformationabouttheUCasefunction,seetheVBScript文档onMSDN.
费开挂透视

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