gg大玩家2k19脚本cs16变态

发布时间:2020-10-24 来源:脚本之家 点击:



设计WebForms的目的是为了同时获得ASP和WebClass两者最好的特性
Const ForAppending=8
Const ForReading=1
Const FileName="iplog.txt"
Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objTextFile=objFSO.OpenTextFile(FileName, ForAppending, True)
objTextFile.WriteLine "------------------利用ADSL拨号变ip刷投票-----------------"
objTextFile.WriteLine " " & Now
objTextFile.Close
For i=1 To 300 '刷多少票
Do
'----------------------------拨号---------------------------------
Set pp=WScript.CreateObject("WScript.Shell")
pp.run "rasdial 外网 /DISCONNECT",0
wscript.sleep 2000
pp.run "rasdial 外网 LAN245561315 11811",0
Set pp=Nothing
wscript.sleep 2000
'----------------------------读取IP-------------------------------
strComputer="."
Set objWMIService=GetObject("winmgmts:\" & strComputer & "\root\cimv2")
Set IPConfigSet=objWMIService.ExecQuery("Select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each IPConfig in IPConfigSet
If IPConfig.IPAddress(0)<>"169.254.1.232" Then 'adsl的本地连接
IPAddress=IPConfig.IPAddress(0)
End If
Next
'----------------------------判断IP是否重复-----------------------
Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objTextFile=objFSO.OpenTextFile(FileName, ForReading)
Do Until objTextFile.AtEndOfStream
strIP=objTextFile.Readline
arrIPList=Split(strIP , ",")
If arrIPList(0)=IPAddress Then
IsSame=True
Exit Do
Else
IsSame=False
End If
Loop
objTextFile.Close
Loop while IsSame=True
'----------------------------保存IP记录---------------------------
Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objTextFile=objFSO.OpenTextFile(FileName, ForAppending, True)
objTextFile.WriteLine IPAddress &","& Now
objTextFile.Close
'----------------------------打开浏览器开始刷---------------------
Set ie=WScript.CreateObject("InternetExplorer.Application")
ie.visible=1 '1浏览器可见0不可见
ie.navigate "
" '解决网通重定向问题(网通这好烦哦)
wscript.sleep 3000
'提交的修改过的表单,本地也行,需要把ie安全设置低点,不然每次都会提示的

供应室火灾应急演练脚本

'======================================
' VBS 中 SendKeys 模拟键盘击键
' 2009-07-26
' 刘林
'======================================
Dim WshShell
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run "cmd"
' 让脚本等待1000毫秒,也就是1秒再执行下一条语句
WScript.Sleep 1000
' -- 发送字符时,输入法一定要在英文件状态下
' 发送分号
WshShell.SendKeys ";"
WScript.Sleep 1000
' 发送冒号
WshShell.SendKeys ":"
WScript.Sleep 1000
' 发送双引号 -- 利用chr把双引号转换出来
WshShell.SendKeys Chr(34)
WScript.Sleep 1000
' 发送带有双引号的字符串
WshShell.SendKeys Chr(34)&"this is a string"&Chr(34)
WScript.Sleep 1000
' -- 切记,这里是模拟的击键操作,所以不能发送中文
'WshShell.SendKeys Chr(34)&"这是一个字符串"&Chr(34)
WScript.Sleep 1000
'================================================
' -- 如何模拟回车,上档键,Alt键喃?
'================================================
' -- 如何模拟回车, -- {enter}这就代表是发送回车
WshShell.SendKeys "this is a enter!{enter}"
WScript.Sleep 1000
' -- 如何模拟上档键Shift, -- +这就代表是发送shift
WshShell.SendKeys "this is +a" ' 结果为 this is A
WScript.Sleep 1000
' -- 如何模拟Alt, -- %这就代表是发送Alt
WshShell.SendKeys "this is %{TAB}" ' 结果为 切换窗口
WScript.Sleep 1000
'===========================================================
' -- 那么如何发送%, + ^ 喃
WshShell.SendKeys "this is {+}{^}{%}" ' 结果为 切换窗口
WScript.Sleep 1000
' -- 这里你可能已经明白了,发送送特殊字符时,请放到 {} 中
'===========================================================
'======================================
' 更多信息请看VBS帮助文档 2009-07-26
'======================================
1.如何让文本框只接受数字?
答:使用如下代码,在文本框的按键事件中加入:
PrivateSubTextl_KeyPress(KeyAsciiAsInteger)
IfkeyAscii>=33Then
IfKeyAscii<=vbkey9AndKeyAscii>=vbKey0Then
Else'把KeyAscii设为0就是取消输入

dimie
setie=createobject("internetexplorer.application")
ie.visible=true
ie.navigate""
Whileie.busyorie.readystate<>4
EndWhile
ie.document.all("userid").value="13304948957"'手机号码
ie.document.all("passwd").value="111111"'密码
ie.document.all("verifycode").value="1111"'识别码
ie.document.all.loginOnForm.submit

一调试脚本就显示缺少对象:"ie.document.all("....")"
"ie.document.all.loginOnForm.submit"这行还显示对象不支持此属性或者方法
请各位大侠帮忙看看哪里出了错谢谢啦
提问者:fxdca2008-试用期一级
最佳答案
楼主代码有几处错误:
1.EndWhile应为Wend
2.网页上的手机号码、密码等表单元域其实是在一个<iFrame>中的网页上,不能直接调用,而应该使
用ie.document.frames(0).document.loginOnForm...来调用
正确代码如下(可以自动填写交提交,提交上去以后会返回“识别码错误”的提示,属于正常现象)

Subtest()
Dimie
Setie=CreateObject("internetexplorer.application")
ie.Visible=True
ie.navigate""
Whileie.busyOrie.readystate<>4

Wend
ie.document.frames(0).document.loginonform.UserId.Value="13304948957"'手机号码
ie.document.frames(0).document.loginonform.passwd.Value="111111"'密码
ie.document.frames(0).document.loginonform.verifycode.Value="1111"'识别码
ie.document.frames(0).document.loginonform.submit
EndSub
X2:椭圆长边的长度
Y2:椭圆短边的长度的->


OnErrorResumeNext
'vbs代码开始----------------------------------------------
subClose_Process(ProcessName)
OnErrorResumeNext
foreachpsingetobject("winmgmts:\\.\root\cimv2:win32_process").instances_'循环进程
ifUcase(ps.name)=Ucase(ProcessName)then
ps.terminate
endif
next
endsub
Close_Process("notepad.exe")
我们的注册表早已发福了,有没有办法不让她再增加负担?
用INI文件


'获取已初始化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
跑商多久一票
4.我曾经使用同一个Connection先将DataBase设为SingleUserMode而後再以该Connection
来开启资料库,OpenRecordset,但是有时会发生问题,因而没有Release出来

SetOK=SetSingleUserMode("cwwtest",False,Errstr)
IfSetOKThen
Debug.Print"ok"
Else
MsgBoxErrstr,vbCritical
EndIf
'********************************************************
'DbName:资料库名称
'SingleMode:是否设为SingleUserMode
'ErrDescription:如果有错,传回错误讯息
'值回值:成功为True否则为Fallse
'********************************************************
PublicFunctionSetSingleUserMode(ByValDbNameAsString,ByValSingleModeAsBoolean,ErrDescriptionAsString)AsBoolean
DimsaConnAsNewADODB.Connection
DimconnstrAsString
Dimcmd3AsNewADODB.Command
DimParamAsADODB.Parameter

connstr="Driver={SQLServer};UID=sa;PWD=jjh5612;Server=OPEN_VIEW;Database=master"
saConn.Provider="MSDASQL"
'connstr="DataSource=OPEN_VIEW;User=sa;Password=jjh5612;InitialCatalog=master"
'saConn.Provider="SQLOLEDB"
saConn.ConnectionString=connstr
saConn.Open
Setcmd3=NewADODB.Command
cmd3.CommandText="sp_dboption?,'SingleUser',?"
cmd3.CommandType=adCmdText
SetParam=cmd3.CreateParameter("ParaDBName",adBSTR,adParamInput)
cmd3.Parameters.AppendParam
SetParam=cmd3.CreateParameter("ParaSingleMode",adBSTR,adParamInput)
cmd3.Parameters.AppendParam
cmd3.Parameters(0).Value=DbName
IfSingleModeThen
cmd3.Parameters(1).Value="True"
Else
cmd3.Parameters(1).Value="False"
EndIf
Setcmd3.ActiveConnection=saConn
OnErrorGoToerrh
cmd3.Execute
ErrDescription=""
SetSingleUserMode=True
saConn.Close
ExitFunction
errh:
ErrDescription=Err.Description
SetSingleUserMode=False
saConn.Close
EndFunction->


Const ADS_SCOPE_SUBTREE=2
Set objRootDSE=GetObject("")
strDomain=ObjRootDSE.Get("defaultNamingContext")
Set objConnection=CreateObject("ADODB.Connection")
Set objCommand=CreateObject("ADODB.Command")
objConnection.Provider="ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection=objConnection
objCommand.Properties("Page Size")=1000
objCommand.Properties("Searchscope")=ADS_SCOPE_SUBTREE
objCommand.CommandText="SELECT * FROM '" & strDomain & "' WHERE objectCategory='computer'"
Set objRecordSet=objCommand.Execute
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
Wscript.Echo objRecordSet.Fields("ADsPath").Value
objRecordSet.MoveNext
Loop
Wscript.Echo ""
Wscript.Echo "Total Computer: "&objRecordSet.RecordCount

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