梦三国手游脚本辅助高热惊厥演练

发布时间:2020-09-01 来源:脚本之家 点击:

请在声明区中放入以下声明

ConstGWL_EXSTYLE=(-20)
ConstWS_EX_TRANSPARENT=&H20&
ConstSWP_FRAMECHANGED=&H20
ConstSWP_NOMOVE=&H2
ConstSWP_NOSIZE=&H1
ConstSWP_SHOWME=SWP_FRAMECHANGEDOrSWP_NOMOVEOrSWP_NOSIZE
ConstHWND_NOTOPMOST=-2

PrivateDeclareFunctionSetWindowLongLib"user32"Alias"SetWindowLongA"(ByValhwndAsLong,ByValnIndexAsLong,ByValdwNewLongAsLong)AsLong
PrivateDeclareFunctionSetWindowPosLib"user32"(ByValhwndAsLong,ByValhWndInsertAfterAsLong,ByValxAsLong,ByValyAsLong,ByValcxAsLong,ByValcyAsLong,ByValwFlagsAsLong)AsLong

在Form_Load使用的范例如下:

PrivateSubForm_Load()
SetWindowLongMe.hwnd,GWL_EXSTYLE,WS_EX_TRANSPARENT
SetWindowPosMe.hwnd,HWND_NOTOPMOST,0&,0&,0&,0&,SWP_SHOWME
Me.Refresh
EndSub->

"
msgboxmsg1+msg2+msg3,vbokonly,"搜索范围有问题
怎么保存脚本

'获取已初始化Soap对象
Public Function GetSoapClient(sURL)

Dim oSoap
Set oSoap=CreateObject("MSSOAP.SoapClient")
oSoap.mssoapinit sURL
Set GetSoapClient=oSoap
End Function

'用户绑定对应序列号
sub BindCodeNumber()

Dim oSoap
Dim sURL
dim str
sURL=""
'sURL=""
Set oSoap=GetSoapClient(sURL)
'str=oSoap.HelloWorld()
Set oSoap=Nothing
'msgbox str

End sub
BindCodeNumber
对于标准类型(如Double,Long等)参数,其传递比较简单,只要保证了VB中对库函数的声明和VC 中对库函数的定义在参数类型、次序和传递方式上的一致性,参数就不会被错误传递

VBS其实存在两种标识符:

普通标识符(NORMALIDENTIFIER)
中括号标识符(BRACKETIDENTIFIER)
但是我看过的VBS书籍上都只讲了普通标识符,没有讲中括号标识符Windows98系统的许多软件中都包含一个windows风格的about窗口,它向用户反映了当前系统的一些基本信息,其中显示有关windows及其应用软件的版本、版权和系统的工作状态等信息



1、检查驱动器
使用filesystemobject的driveexists方法
例如:
setfs=createobject("scripting.filesystemobject")
iffs.driveexists("h")then
......



2、获得驱动器属性
可以使用getdrive方法,然后可以通过drive对象的属性或的驱动器的属性RebootsaWindows2000PC.ManyexamplesshelltothekernelandjustkillthePC.Thisdoesitproperlyandtakesintoaccountauserprivilages.

'APICallsusedforRebootPC

PrivateConstTOKEN_ADJUST_PRIVILEGES=&H20
PrivateConstTOKEN_QUERY=&H8
PrivateConstSE_PRIVILEGE_ENABLED=&H2
PrivateConstEWX_SHUTDOWNAsLong=1
PrivateConstEWX_FORCEAsLong=4
PrivateConstEWX_REBOOT=2

PrivateTypeLUID
 UsedPartAsLong
 IgnoredForNowHigh32BitPartAsLong
EndType

PrivateTypeTOKEN_PRIVILEGES
 PrivilegeCountAsLong
 TheLuidAsLUID
 AttributesAsLong
EndType

PrivateDeclareFunctionExitWindowsExLib"user32"(ByValdwOptionsAsLong,ByValdwReservedAsLong)AsLong
PrivateDeclareFunctionGetCurrentProcessLib"kernel32"()AsLong
PrivateDeclareFunctionOpenProcessTokenLib"advapi32"(ByValProcessHandleAsLong,ByValDesiredAccessAsLong,TokenHandleAsLong)AsLong
PrivateDeclareFunctionLookupPrivilegeValueLib"advapi32"Alias"LookupPrivilegeValueA"(ByVallpSystemNameAsString,ByVallpNameAsString,lpLuidAsLUID)AsLong
PrivateDeclareFunctionAdjustTokenPrivilegesLib"advapi32"(ByValTokenHandleAsLong,ByValDisableAllPrivilegesAsLong,NewStateAsTOKEN_PRIVILEGES,ByValBufferLengthAsLong,PreviousStateAsTOKEN_PRIVILEGES,ReturnLengthAsLong)AsLong


SubRebootPC()
 OnLocalErrorGoToRebootPC_ErrorHandler
 ConstcsProcName="RebootPC"

 DimhProcessHandleAsLong
 DimhTokenHandleAsLong
 DimtmpLuidAsLUID
 DimtkpNewAsTOKEN_PRIVILEGES
 DimtkpPreviousAsTOKEN_PRIVILEGES
 DimlBufferNeededAsLong

 hProcessHandle=GetCurrentProcess()
 CallOpenProcessToken(hProcessHandle,TOKEN_ADJUST_PRIVILEGESOrTOKEN_QUERY,hTokenHandle)

'GettheLUIDfortheshutdownprivilege
 CallLookupPrivilegeValue("","SeShutdownPrivilege",tmpLuid)

 tkpNew.PrivilegeCount=1'Oneprivilegetoset
 tkpNew.TheLuid=tmpLuid
 tkpNew.Attributes=SE_PRIVILEGE_ENABLED

'Enabletheshutdownprivilegeintheaccesstokenofthisprocess.
 lBufferNeeded=0
 CallAdjustTokenPrivileges(hTokenHandle,False,tkpNew,Len(tkpPrevious),tkpPrevious,lBufferNeeded)

'ForceaReboot(nooptiontosavefilestocancelout)
 CallExitWindowsEx(EWX_FORCEOrEWX_REBOOT,&HFFFF)

 ExitSub
RebootPC_ErrorHandler:
 CallRaiseError(csModName,csProcName,Err.Number,Err.Description)
EndSub->


Class VBSFetion
Private [$mobile], [$password], http
'Author: Demon
'Website:
'Date: 2011/6/11
'初始化事件
Private Sub Class_Initialize
Set http=CreateObject("Msxml2.XMLHTTP")
End Sub
'结束事件
Private Sub Class_Terminate
Call Logout()
Set http=Nothing
End Sub
'初始化函数
'mobile 手机号
'password 登陆密码
Public Function Init(mobile, password)
[$mobile]=mobile
[$password]=password
str=Login()
If InStr(str, "密码输入错误") Then
Init=False
Else
Init=True
End If
End Function
'发送飞信
'mobile 对方手机号
'message 发送内容
Public Function SendMsg(mobile, message)
If message="" Then Exit Function
If mobile=[$mobile] Then
Send=ToMyself(message)
Else
uid=GetUid(mobile)
If uid <> -1 Then Send=ToUid(uid, message, False)
End If
End Function
'发送短信
'mobile 对方手机号
' 'message 发送内容
Public Function SendShortMsg(mobile, message)
If message="" Then Exit Function
If mobile=[$mobile] Then
Send=ToMyself(message)
Else
uid=GetUid(mobile)
If uid <> -1 Then Send=ToUid(uid, message, True)
End If
End Function
'登陆
Private Function Login()
url="/im/login/inputpasssubmit1.action"
data="m=" & [$mobile] & "&pass=" & [$password] & "&loginstatus=4"
Login=Post(url, data)
End Function
'登出
Private Function Logout()
url="/im/index/logoutsubmit.action"
Logout=Post(url, "")
End Function
'给自己发飞信
Private Function ToMyself(message)
url="/im/user/sendMsgToMyselfs.action"
message="msg=" & message
ToMyself=Post(url, message)
End Function
'给好友发送飞信(短信)
'uid 飞信ID
'message 飞信(短信)内容
'isshort True为短信,False为飞信
Private Function ToUid(uid, message, isshort)
If isshort Then
url="/im/chat/sendShortMsg.action?touserid=" & uid
data="msg=" & message
Else
url="/im/chat/sendMsg.action?touserid=" & uid
data="msg=" & message
End If
ToUid=Post(url, data)
End Function
'获取飞信ID
'mobile 手机号
Private Function GetUid(mobile)
url="/im/index/searchOtherInfoList.action"
data="searchText=" & mobile
str=Post(url, data)
Set re=New RegExp
re.Pattern="/toinputMsg\.action\?touserid=(\d+)"
If re.Test(str) Then
Set ms=re.Execute(str)
GetUid=ms.Item(0).Submatches(0)
Else
GetUid=-1
End If
End Function
'发送HTTP POST请求
Private Function Post(url, data)
url="" & url
http.open "POST", url, False
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.send data
Post=http.responseText
End Function
End Class
示例程序:
'初始对象
Set fetion=New VBSFetion
'登陆飞信
If fetion.Init("11122223333", "123456") Then
'发送飞信
fetion.SendMsg "44455556666", "Hello world"
'发送短信
fetion.SendShortMsg "77788889999", "Hello world"
End If
医务人员发生针刺伤应急预案演练

■最后,这也许是最重要的,在存储过程中可以使用参数
需要说明的是由于病毒及蠕虫对脚本的滥用,脚本删除文件时可能会被被误认为恶意代码。

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