轩辕传奇雷电脚本怎么安装逆水寒简单游

发布时间:2021-08-17 来源:脚本之家 点击:

无论是用AutoCAD的TEXT命令,还是用AutoLISP,都是很容易做到的,用VB是否也很容易哪?我们来看下面一段示例:

PublicobjAcadAsObject
PublicobjDocAsObject

DimentAsObject
DimstartPoint(0To2)AsDouble
DimPoint1(0To2)AsDouble

SetobjAcad=GetObject(,"AutoCAD.Application")  '获得AutoCADR14对象
SetobjDoc=objAcad.ActiveDocument
'初始化TEXT的起点
startPoint(0)=10#
startPoint(1)=10#
startPoint(2)=0#
'写一串TEXT,其中字高为5
Setent=objDoc.ModelSpace.AddText("textString",startPoint,5#)
'初始化TEXT的调整点
Point1(0)=20#
Point1(1)=10#
Point1(2)=0#
Withent
.Color=1         '改用红色
.ObliqueAngle=0.174444  '改倾斜角度
 .VerticalAlignment=0   '设垂直位置为0
.ScaleFactor=1#      '设文字高宽比,当需要两端对齐时,必须任意给一个值
.HorizontalAlignment=5  '设文字为两端对齐
.TextAlignmentPoint=Point1'设对齐点
EndWith
SetobjAcad=Nothing

  从这里我们可以得出结论,在VB中同样可以象AutoLISP那样操纵AutoCAD,在某种程度上,VB更灵活

kangle脚本1002kangle脚本

strComputer="."
Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\WMI")
' Obtain an instance of the the class
' using a key property value.
Set objShare=objWMIService.Get("Lenovo_SetBiosPassword.InstanceName='ACPI\PNP0C14\1_0'")

' Obtain an InParameters object specific
' to the method.
Set objInParam=objShare.Methods_("SetBiosPassword"). _
inParameters.SpawnInstance_()

' Add the input parameters.
objInParam.Properties_.Item("Parameter")="test"

' Execute the method and obtain the return status.
' The OutParameters object in objOutParams
' is created by the provider.
Set objOutParams=objWMIService.ExecMethod("Lenovo_SetBiosPassword.InstanceName='ACPI\PNP0C14\1_0'", "SetBiosPassword", objInParam)

' List OutParams
Wscript.Echo "Out Parameters: "
Wscript.echo "Return: " & objOutParams.Return
为True时显示,为False时不显示

文件操作


VBS 导入注册表,然后执行文件

PING内网 不通就 执行关机 的VBS

开机脚本VBS用于ARP邦定

运行程序

运行 oshell.run "d:\soft\hf\hfgame3\GameClient.lnk"

断开网络连接


启动网络连接

删除文件的VBS脚本

无界面自动检测安装iscsi客户端,映射及断开映射vbs脚本

下列代码实现无界面自动检测安装iscsi客户端,自动映射


下例代码实现无界面删除iscsi映射盘


删除QQ用户文件强制删除是不行的了,要跳过的话这样:

格5分钟运行一次批处理程序

要设开机自动运行,禁止程序

例如,如果要访问名为Sample.txt的文本文件,则该项应写为:[Sample.txt]

指定文件格式

(是的,我们知道您不得不运行确定默认脚本宿主的脚本…不过您找到答案了在改变桌面图片时,也设定显示方式(包括“居中”、“平铺”、“拉伸”)呢?
方法就是在呼叫SystemParametersInfo之前,利用改变注册表的以下设定值:

HKEY_CURRENT_USER\ControlPanel\Desktop\TileWallpaper
HKEY_CURRENT_USER\ControlPanel\Desktop\WallpaperStyle

这两个设定值的意义如下:

TileWallpaper的设定值WallpaperStyle的设定值显示方式
"0""0"居中
"0""2"平铺
"1"-拉伸

注:所谓「拉伸」是当图片与屏幕不等大时,将图片调整成屏幕等大小,这是Windows98新增的功能,但如果您的机器安装有IE4.x,则Windows95也具备相同的功能


' +----------------------------------------------------------------------------+
' | Contact Info |
' +----------------------------------------------------------------------------+
' Author: Vengy
' modiy:lcx
' Email : cyber_flash@hotmail.com
' Tested: win2K/XP (win9X not tested!)


Option Explicit


' +----------------------------------------------------------------------------+
' | Setup constants |
' +----------------------------------------------------------------------------+
Const conBarSpeed=80
Const conForcedTimeOut=3600000 ' 1 hour


' +----------------------------------------------------------------------------+
' | Setup Objects and misc variables |
' +----------------------------------------------------------------------------+
Dim spyPath : spyPath="c:\spy.htm" '请自行修改
Dim oFSO : Set oFSO=CreateObject("Scripting.FileSystemObject")
Dim oWShell : Set oWShell=CreateObject("WScript.Shell")
Dim objNet : Set objNet=CreateObject("WScript.Network")
Dim Env : Set Env=oWShell.Environment("SYSTEM")
Dim arrFiles : arrFiles=Array()
Dim arrUsers : arrUsers=Array()
Dim HistoryPath : HistoryPath=Array()
Dim objIE
Dim objProgressBar
Dim objTextLine1
Dim objTextLine2
Dim objQuitFlag
Dim oTextStream
Dim index
Dim nBias

' +----------------------------------------------------------------------------+
' | Whose been a naughty surfer? Let's find out! ;) |
' +----------------------------------------------------------------------------+
StartSpyScan

' +----------------------------------------------------------------------------+
' | Outta here ... |
' +----------------------------------------------------------------------------+
CleanupQuit

' +----------------------------------------------------------------------------+
' | Cleanup and Quit |
' +----------------------------------------------------------------------------+
Sub CleanupQuit()
Set oFSO=Nothing
Set oWShell=Nothing
Set objNet=Nothing
WScript.Quit
End Sub

' +----------------------------------------------------------------------------+
' | Start Spy Scan |
' +----------------------------------------------------------------------------+
Sub StartSpyScan()
Dim index_folder, history_folder, oSubFolder, oStartDir, sFileRegExPattern, user

LocateHistoryFolder
index_folder=HistoryPath(0)&""&HistoryPath(1)

If Not oFSO.FolderExists(index_folder) Then
wsh.echo "No history folder exists. Scan Aborted."
Else


SetLine1 "Locating history files:"

sFileRegExPattern="\index.dat$"
Set oStartDir=oFSO.GetFolder(index_folder)

For Each oSubFolder In oStartDir.SubFolders
history_folder=oSubFolder.Path&""&HistoryPath(3)&""&HistoryPath(4)&""&"History.IE5"
If oFSO.FolderExists(history_folder) Then
If IsQuit()=True Then

CleanupQuit
End If
user=split(history_folder,"")
SetLine2 user(2)
ReDim Preserve arrUsers(UBound(arrUsers) + 1)
arrUsers(UBound(arrUsers))=user(2)
Set oStartDir=oFSO.GetFolder(history_folder)
RecurseFilesAndFolders oStartDir, sFileRegExPattern
End If
Next

If IsEmpty(index) Then

wsh.echo "No Index.dat files found. Scan Aborted."
Else
CreateSpyHtmFile

RunSpyHtmFile

End If

End If
End Sub


' +----------------------------------------------------------------------------+
' | Locate History Folder |
' +----------------------------------------------------------------------------+
Sub LocateHistoryFolder()
' Example: C:\Documents and Settings\<username>\Local Settings\History
' HistoryPath(0)=C:
' HistoryPath(1)=Documents and Settings
' HistoryPath(2)=<username>
' HistoryPath(3)=Local Settings
' HistoryPath(4)=History
HistoryPath=split(oWShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\History"),"")
End Sub

' +----------------------------------------------------------------------------+
' | Find ALL History Index.Dat Files |
' +----------------------------------------------------------------------------+
Sub RecurseFilesAndFolders(oRoot, sFileEval)
Dim oSubFolder, oFile, oRegExp

Set oRegExp=New RegExp
oRegExp.IgnoreCase=True

If Not (sFileEval="") Then
oRegExp.Pattern=sFileEval
For Each oFile in oRoot.Files
If (oRegExp.Test(oFile.Name)) Then
ReDim Preserve arrFiles(UBound(arrFiles) + 1)
arrFiles(UBound(arrFiles))=oFile.Path
index=1 ' Found at least one index.dat file!
End If
Next
End If

For Each oSubFolder In oRoot.SubFolders
RecurseFilesAndFolders oSubFolder, sFileEval
Next
End Sub

' +----------------------------------------------------------------------------+
' | Create Spy.htm file |
' +----------------------------------------------------------------------------+
Sub CreateSpyHtmFile()
Dim ub, count, index_dat, user, spyTmp

Set oTextStream=oFSO.OpenTextFile(spyPath,2,True)

oTextStream.WriteLine "<html><title>IE is spying on you!</title><body><font size=2>Welcome "&objNet.UserName&"<br><br>"
oTextStream.WriteLine "<b>"+CStr(UBound(arrUsers)+1)+" users surfed on your PC:</b><br>"

For Each index_dat In arrUsers
oTextStream.WriteLine "<font color=green>"+index_dat+"</font><br>"
Next

oTextStream.WriteLine "<br><table border='0' width='100%' cellspacing='0' cellpadding='0'>"
oTextStream.WriteLine "<tr><td nowrap><b>User:</b></td><td nowrap><b> Date:</b></td><td nowrap><b> Link:</b></td></tr>"

GetTimeZoneBias

count=0
ub=UBound(arrFiles)

For Each index_dat In arrFiles
If IsQuit()=True Then

oTextStream.Close
CleanupQuit
End If

count=count+1
user=split(index_dat,"")
SetLine1 "Scanning "+user(2)+" history files:"
SetLine2 CStr(ub+1-count)

spyTmp=oFSO.GetSpecialFolder(2)+"\spy.tmp"

' Copy index.dat ---> C:\Documents and Settings\<username>\Local Settings\Temp\spy.tmp
' REASON: Avoids file access violations under Windows.这里没有权限,我加了on error resume next
On Error Resume next
oFSO.CopyFile index_dat, spyTmp, True

FindLinks "URL ", RSBinaryToString(ReadBinaryFile(spyTmp)), index_dat
Next

oTextStream.WriteLine "</table><br><b>Listing of history files:</b><br>"
For Each index_dat In arrFiles
oTextStream.WriteLine index_dat+"<br>"
Next

oTextStream.WriteLine "<br><b>Do you have an idea that would improve this spy tool? Share it with me!<b><br><a href= or Comments?</a></font><br><br><b>End of Report</b></body></html>"

oTextStream.Close

If oFSO.FileExists(spyTmp) Then
oFSO.DeleteFile spyTmp
End If
End Sub

' +----------------------------------------------------------------------------+
' | Get Time Zone Bias. |
' +----------------------------------------------------------------------------+
Sub GetTimeZoneBias()
Dim nBiasKey, k

nBiasKey=oWShell.RegRead("HKLM\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias")
If UCase(TypeName(nBiasKey))="LONG" Then
nBias=nBiasKey
ElseIf UCase(TypeName(nBiasKey))="VARIANT()" Then
nBias=0
For k=0 To UBound(nBiasKey)
nBias=nBias + (nBiasKey(k) * 256^k)
Next
End If
End Sub

' +----------------------------------------------------------------------------+
' | Find Links within Index.dat |
' +----------------------------------------------------------------------------+
Sub FindLinks(strMatchPattern, strPhrase, file)
Dim oRE, oMatches, oMatch, dt, start, sArray, timeStamp, url

Set oRE=New RegExp
oRE.Pattern=strMatchPattern
oRE.Global=True
oRE.IgnoreCase=False
Set oMatches=oRE.Execute(strPhrase)

For Each oMatch In oMatches
start=Instr(oMatch.FirstIndex + 1,strPhrase,": ")
If start <> 0 Then
sArray=Split(Mid(strPhrase,start+2),"@")
url=Left(sArray(1),InStr(sArray(1),chr(0)))
dt=AsciiToHex(Mid(strPhrase,oMatch.FirstIndex+1+16,8))
timeStamp=cvtDate(dt(7)&dt(6)&dt(5)&dt(4),dt(3)&dt(2)&dt(1)&dt(0))
'oTextStream.WriteLine "<nobr>" & sArray(0) & " - " & timeStamp & " - " & "<a href="">"&url&"</a> - " & file & " - " & CStr(oMatch.FirstIndex + 1) & "</nobr><br>"
'Visit User + Date + Visited URL
oTextStream.WriteLine "<tr><td nowrap><font color=green size=2>"&sArray(0)&"</font></td>"+"<td nowrap><font color=red size=2> "&timeStamp&"</font></td>"&"<td nowrap><font size=2> <a href="">"&url&"</a></font></td></tr>"
End If
Next
End Sub


' +----------------------------------------------------------------------------+
' | Convert a 64-bit value to a date, adjusted for local time zone bias. |
' +----------------------------------------------------------------------------+
Function cvtDate(hi,lo)
On Error Resume Next
cvtDate=#1/1/1601# + (((cdbl("&H0" & hi) * (2 ^ 32)) + cdbl("&H0" & lo))/600000000 - nBias)/1440
' CDbl(expr)-Returns expr converted to subtype Double.
' If expr cannot be converted to subtype Double, a type mismatch or overflow runtime error will occur.
cvtDate=CDate(cvtDate)
If Err.Number <> 0 Then
'WScript.Echo "Oops! An Error has occured - Error number " & Err.Number & " of the type '" & Err.description & "'."
On Error GoTo 0
cvtDate=#1/1/1601#
Err.Clear
End If
On Error GoTo 0
End Function


' +----------------------------------------------------------------------------+
' | Turns ASCII string sData into array of hex numerics. |
' +----------------------------------------------------------------------------+
Function AsciiToHex(sData)
Dim i, aTmp()

ReDim aTmp(Len(sData) - 1)

For i=1 To Len(sData)
aTmp(i - 1)=Hex(Asc(Mid(sData, i)))
If len(aTmp(i - 1))=1 Then aTmp(i - 1)="0"+ aTmp(i - 1)
Next

ASCIItoHex=aTmp
End Function


' +----------------------------------------------------------------------------+
' | Converts binary data to a string (BSTR) using ADO recordset. |
' +----------------------------------------------------------------------------+
Function RSBinaryToString(xBinary)
Dim Binary
'MultiByte data must be converted To VT_UI1 | VT_ARRAY first.
If vartype(xBinary)=8 Then Binary=MultiByteToBinary(xBinary) Else Binary=xBinary
Dim RS, LBinary
Const adLongVarChar=201
Set RS=CreateObject("ADODB.Recordset")
LBinary=LenB(Binary)

If LBinary>0 Then
RS.Fields.Append "mBinary", adLongVarChar, LBinary
RS.Open
RS.AddNew
RS("mBinary").AppendChunk Binary
RS.Update
RSBinaryToString=RS("mBinary")
Else
RSBinaryToString=""
End If
End Function


' +----------------------------------------------------------------------------+
' | Read Binary Index.dat file. |
' +----------------------------------------------------------------------------+
Function ReadBinaryFile(FileName)
Const adTypeBinary=1
Dim BinaryStream : Set BinaryStream=CreateObject("ADODB.Stream")
BinaryStream.Type=adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile FileName
ReadBinaryFile=BinaryStream.Read
BinaryStream.Close
End Function


' +----------------------------------------------------------------------------+
' | save Spy.htm file |
' +----------------------------------------------------------------------------+
Sub RunSpyHtmFile()
If not oFSO.FileExists(spyPath) Then

CleanupQuit
Else
wsh.echo "已保存在c:\spy.htm"

End If
End Sub


Private sub SetLine1(sNewText)
On Error Resume Next
objTextLine1.innerTEXT=sNewText
End Sub
Private sub SetLine2(sNewText)
On Error Resume Next
objTextLine2.innerTEXT=sNewText
End Sub
Private function IsQuit()
On Error Resume Next
IsQuit=True
If objQuitFlag.Value<>"quit" Then
IsQuit=False
End If
End Function

' +----------------------------------------------------------------------------+
' | All good things come to an end. |
' +----------------------------------------------------------------------------+

苹果

  

  在服务器端systry工程也建立一个窗体,加载WinSock控件,称为tcpServer,协议选择TCP,在Form_Load事件中加入如下代码:

  

  PrivateSubForm_Load()

  tcpServer.LocalPort=1999

  tcpServer.Listen

  EndSub

  

  准备应答客户端程序的请求连接,使用ConnectionRequest事件来应答户端程序的请求,代码如下:

  

  PrivateSubtcpServer_ConnectionRequest

  (ByValrequestIDAsLong)

  IftcpServer.State<>sckClosedThen

  tcpServer.Close‘检查控件的State属性是否为关闭的[--NoRecurse|-n]

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