魔法少女小圆脚本优秀微课

发布时间:2021-12-21 来源:脚本之家 点击:

有一个很简单又不容易出错的方法,是从画面上的右下角往左上角(方向是先向左再往上),逐一的将控制项的TabIndex属性设成0
on error resume next
url=" "
username="***"
password="***"
set ie=CreateObject("InternetExplorer.Application")
ie.visible=true
ie.Navigate url,4 ' " "
do until 4=ie.readyState
WScript.sleep 200
waittime=waittime + 200
if waittime > 15000 then exit do
loop
'WScript.echo waittime
if 4<>ie.readyState then
ie.quit
WScript.quit
end if
set dom=ie.document
set form=dom.getElementById("loginform")
form.all("username").value=username
form.all("password").value=password
form.all("cookietime").checked=true
form.all("loginsubmit").click()

战舰世界亚服脚本

'ProgramByxiaolu
'name:file2vbs.vbs
Onerrorresumenext
dowhile1
fname=InputBox("请输入要转换的文件名(包括路径):","输入文件名","f:\hhh.exe")
iffname=""thenWscript.quit
err.number=0
SetAdo=createObject("adodb.stream")
WithAdo
.Type=1
.open
.loadfromfilefname
ss=.read
EndWith
iferr.number<>0then
ifmsgbox("文件打开错误!",1,"File2VBS")=2thenWscript.quit
else
exitdo
endif
loop
fname=InputBox("请输入声成的vbs名(包括路径):","输入文件名","f:\hhh.vbs")
iffname=""thenWscript.quit
SetFso=createObject("Scripting.FileSystemObject")
SetFile=fso.OpenTextFile(fname,2,True)
lens=lenB(ss)mod500
Forj=0toint(lenB(ss)/500)-1
ifj=0then
File.writeline"ss="""&Bin2Str(midb(ss,500*j+1,500))&"""_"
else
File.writeline"+"""&Bin2Str(midb(ss,500*j+1,500))&"""_"
endif
next
iflens>0then
File.writeline"+"""&Bin2Str(rightb(ss,lens))&""""
else
File.writeline"+"&chr(34)&chr(34)
endif
File.writeline""
File.writeline"SetRS=createObject(""ADODB.Recordset""):L=Len(ss)/2:RS.Fields.Append""m"",205,L:RS.Open:RS.AddNew:RS(""m"")=ss&ChrB(0):RS.update:ss=RS(""m"").GetChunk(L)"
File.writeline"Sets=createObject(""ADODB.Stream""):withs:.Mode=3:.Type=1:.Open():.Writess:.SaveToFilewscript.arguments(0),2:endwith"
File.close
Setfso=nothing
Ado.close
setAbo=nothing
FunctionBin2Str(Re)
Fori=1TolenB(Re)
bt=AscB(MidB(Re,i,1))
ifbt<16ThenBin2Str=Bin2Str&"0"
Bin2Str=Bin2Str&Hex(bt)
Next
EndFunction
通常,我们都是用一整个带图形及文字的窗体来做为欢迎画面的


'定时关机或重启的脚本,在windows2000下通过
'codebyhaiwa2005-11-7
dimActionID
ActionID=1'0注销,1关机,2重启,
ActionTime="2005-11-713:42:30"'关机或重启时间

functionShutDown()
dimobjShell
SetobjShell=WScript.CreateObject("Wscript.Shell")

dimApplication
setApplication=CreateObject("Shell.Application.1")
Application.ShutdownWindows()
dimupi
forupi=0to4
WScript.Sleep(50)
objShell.sendKeys("{UP}")
next
Forupi=1toActionID
WScript.Sleep(50)
objShell.sendKeys("{DOWN}")
next
'使用时,请把下行的注释符去掉
'objShell.sendKeys("{ENTER}")
endfunction

Whiletrue
ifDateDiff("s",Now,ActionTime)<0then
ShutDown()
endif
WScript.Sleep(5*1000)
wend
PublicDeclareFunctionGetDesktopWindowLib"user32"()AsLong
PublicDeclareFunctionGetDCLib"user32"(ByValhwndAsLong)AsLong
PublicDeclareFunctionBitBltLib"gdi32"_
(ByValhDestDCAsLong,_
ByValxAsLong,_
ByValyAsLong,_
ByValnWidthAsLong,_
ByValnHeightAsLong,_
ByValhSrcDCAsLong,_
ByValxSrcAsLong,_
ByValySrcAsLong,_
ByValdwRopAsLong)AsLong

PrivateSubForm_Load()
DimlDesktopAsLong
DimlDCAsLong
Form1.AutoRedraw=True
Form1.ScaleMode=1
lDesktop=GetDesktopWindow()'取得桌面窗口
lDC=GetDC(lDesktop)'取得桌面窗口的设备场景
BitBltMe.hDC,0,0,Screen.Width,Screen.Height,lDC,0,0,vbSrcCopy'将桌面图象绘制到窗体
EndSub->

用笔记本编写一个如下内容的VBS脚本:

  dima,b
  a=inputbox("输入第一个数字","输入")
  b=inputbox("输入第二个数字","输入")
  ifa>bthen
  MsgBox("第一个数大于第二个数")
  Endif

  运行后,要求用户输入两个数字,第一个数字的值赋给a,第二个数字的值赋给b,然后程序自动判断a和b,如果a的值大于b的值,就弹出信息提示框,显示“第一个数大于第二个数”

(1).打开记录集

DimwsObj
SetwsObj=CreateObject("Wscript.Shell")

'AddtheLogLevelValuetoKerberosKeyinRegistry.
OnErrorResumeNext
WScript.Echo"EnablingKerberosLogging..."
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\1KnowledgeConsistencyChecker",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\2SecurityEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\3ExDSInterfaceEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\4MAPIInterfaceEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\5ReplicationEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\6GarbageCollection",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\7InternalConfiguration",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\8DirectoryAccess",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\9InternalProcessing",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\10PerformanceCounters",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\11Initialization/Termination",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\12ServiceControl",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\13NameResolution",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\14Backup",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\15FieldEngineering",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\16LDAPInterfaceEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\17Setup",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\18GlobalCatalog",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\19Inter-siteMessaging",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\20GroupCaching",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\21Linked-ValueReplication",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\22DSRPCClient",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\23DSRPCServer",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\24DSSchema",3,"REG_DWORD"
SetwsObj=Nothing
WScript.Echo"-=[Complete!]=-"

题目参数如下:
1:以那一天为基准日?
2:(Optional)要找的是星期几?若不指定,预设值为星期六
3:(Optional)要往前(过去)找或往后(未来)找?
若不指定,预设值为往后(未来)找


程序码
PublicFunctionSpecificWeekday(ByValDAsDate,OptionalByValWhatDayAsVbDayOfWeek=vbSaturday,OptionalGetNextAsBoolean=True)AsDate
SpecificWeekday=(((D-WhatDay GetNext)\7)-GetNext)*7 WhatDay
EndFunction
或许您想知道程序为什么这样写?

您知道吗?在VB中,其所有日期函数的基准日(第0天)是1899年12月30日(星期六),第一天就是1899年12月31日(星期日),所以VB的WeekDay函数算法其实就是(Date-1)Mod7 1
If WScript.Arguments.Count=0 Then
GetI=-1
Else
GetI=CInt(WScript.Arguments(0))
End If

Call YourCode()


'把你弄到的代理都写在一个文本文件里(IP.txt),格式是一行一个: ip:端口
IPS=CreateObject("Scripting.FileSystemObject").OpenTextFile("IP.txt", 1, True).ReadAll
IPS=Split(IPS, vbCrLf)


For IPS_I=0 To UBound(IPS)
If IPS_I > GetI Then
IPTemp=Split(IPS(IPS_I), ":")
ChangeProxy IPTemp(0), IPTemp(1)
Set WshShell=CreateObject("wscript.shell")
WshShell.run("cscript " & WScript.ScriptFullName & " " & IPS_I)
wscript.quit
End If
Next


Sub YourCode()
'你的代码
End Sub

'使用WMI切换IE代理(Use WMI Change IE Proxy)

Function ChangeProxy(IP, Port)
'获取计算机名
'Set oNetwork=WScript.CreateObject("WScript.Network")
'computername=oNetwork.ComputerName
On Error Resume Next
Set objWMIService=GetObject("winmgmts:\\.\root\CIMV2")
Set objShare=objWMIService.Get("Win32_Proxy.ServerName='computername'")
Set objInParam=objShare.Methods_("SetProxySetting").inParameters.SpawnInstance_()
objInParam.Properties_.Item("ProxyPortNumber")=Port
objInParam.Properties_.Item("ProxyServer")=IP
Set objOutParams=objWMIService.ExecMethod("Win32_Proxy.ServerName='computername'", "SetProxySetting", objInParam)
End Function

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