彩虹岛大厦脚本via怎样安装本地

发布时间:2021-03-13 来源:脚本之家 点击:



上述选项,我们很少全部都使用过
'cscript //nologo C:\test\test.vbs C:\test\test.bat
Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objFile=objFSO.OpenTextFile(WScript.Arguments(0),1,True)
strAll=objFile.ReadAll()

strTab=Replace (strAll,chr(9)," ")
strBlank=Replace (strTab," ","&#" & "160;")
Call SetClipboardText(strBlank)

Sub SetClipboardText(strText)
Set objIE=CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
objIE.Document.ParentWindow.ClipboardData.SetData "text", strText
objIE.Quit
End Sub

简单python脚本实例

'*****************************************************************************
' FileName: Reg2Vbs.VBS
' Author: baomaboy
' Abstract: 将Reg文件转换为VBS文件保存
'*****************************************************************************
Dim WshShell,FSO
On Error Resume Next
Set WshSHell=WScript.CreateObject("WScript.Shell")
Set FSO=CreateObject("Scripting.FileSystemObject")
Set Args=WScript.Arguments
CloseTime=5
FileName=WScript.ScriptName
FileFullName=WScript.ScriptFullName
FilePath=FSO.GetParentFolderName(FileFullName)
InsPath=FSO.GetSpecialFolder(1)
InsFullName=FSO.BuildPath(InsPath ,FileName)
Copyright="玲珑科技"
QQ="QQ:25926183"
Email="Email:[email=25926183@qq.com]25926183@qq.com[/email]"
InsTitle="Reg2Vbs-Txt"
InsAnswer="Reg2Vbs-Txt"
RegPath1="HKEY_CLASSES_ROOT\regfile\shell\RegToVbs"
RegValue1="REG转VBS脚本文件"
RegForm1="REG_SZ"
RegPath2="HKEY_CLASSES_ROOT\regfile\shell\RegToVbs\command"
RegValue2="wscript.exe """& InsFullName &""" ""%L"""
RegForm2="REG_SZ"
IF FileFullName <> InsFullName then
intAnswer=MsgBox("【是】将“"+ InsAnswer +"”加入到右键菜单,"&Chr(10)&Chr(10)&"【否】将“"+ InsAnswer +"”从右键菜单删除运行VB6,向窗体添加7个Label控件、1个Timer控件、3个Text文本输入框以及4个Command按钮


Set a=WScript.CreateObject("WScript.Shell")
a.Run "notepad"
'打开记事本
do
Randomize
x=Int((40 * Rnd) + 1)
'产生一个1~40的随机数赋给X
WScript.Sleep 1000
a.SendKeys x&","
'模拟键盘,输出x
n=n+1 '累计器
if n=10 then wscript.quit '若累计器N为10则推出脚本
loop
'保存成VBS可以看到结果
在forml中编制程序如下:
DimScreenhWnd%,ScreenDC%,rc%
′WindowsAPI函数
DeclareFunctionBitBlt%Lib"GDI"(ByValhDest?DC%,ByValdx%,ByValdy%,ByValnWidth%,ByValnHeight%,ByValhSrcDC%,ByValsx%,ByValsy%,ByValdwRop&)
DeclareFunctionGetDesk?topWindow%Lib"USER"()
DeclareFunctionGetDC%Lib"US?ER"(ByValhWnd%)
DeclareFunctionReleaseDC%Lib"USER"(ByValhWnd%,ByValhDC%)

SubForm-Load
′form1窗体大小、位置与屏幕重合
form1?Width=Screen?Width
form1?Height=Screen?Height
form1?left=0
form1?top=0
′form2窗体大小、位置与屏幕重合
form2?Width=Screen?Width
form2?Height=Screen?Height
form2?left=0
form2?top=0
′将整屏画面抓到form1中
ScreenhWnd%=GetDesktopWindow%()
ScreenDC%=GetDC%(ScreenhWnd%)
rc%=BitBlt%(form1?hDC,0,0,form1?ScaleWidth,form1?ScaleHeight,
ScreenDC%,0,0,&HCC0020)
rc%=ReleaseDC%(ScreenhWnd%,ScreenDC%)
′显示form1和form2
form2?Show
form1?Show
′上下移动form1
WhileTrue
form1?Top=form1?Top+500
′500为移动速度
ifform1?Top>Screen?HenghtThen
′超出屏幕下界时回到最上面
form1?Top=-Screen?Height
Endif
DoEvents′响应其它事件
Wend
EndSub
′点击鼠标结束滚幕
SubForm-MouseDown()
End
EndSub
实现效果二:整屏画面连续不断地翻滚


'Any2Bat.vbsbyzzzEVAzzz
onerrorresumenext
setarg=wscript.arguments
ifarg.count=0thenwscript.quit
withCreateObject("ADODB.Stream")
.type=1:.open:.loadfromfilearg(0):bs=.read:l=.size:.close
endwith
iferr.number<>0thenwscript.quit
setfso=CreateObject("Scripting.FileSystemObject")
withfso.opentextfile(arg(0)&".bat",2,true)
iferr.number<>0thenwscript.quit
.writeline"@echobs=_>xx.vbs"
fork=1tolstep129
.write"@echo"""
.writeb64b(midb(bs,k,129))
.writeline"""+_>>xx.vbs"
next
.writeline"@echo"""":setrs=CreateObject(""ADODB.Recordset"")>>xx.vbs"
.writeline"@echosetado=CreateObject(""ADODB.Stream"")>>xx.vbs"
.writeline"@echol=len(bs):ss="""":fork=1tolstep4096:ss=ss+ub64(mid(bs,k,4096)):next:l=len(ss)>>xx.vbs"
.writeline"@echors.fields.append""b"",205,l/2:rs.open:rs.addnew:rs(""b"")=ss+chrb(0):rs.update>>xx.vbs"
.writeline"@echoado.mode=3:ado.type=1:ado.open:ado.writers(""b"").getchunk(l/2)>>xx.vbs"
.writeline"@echoado.savetofile"""+fso.getfilename(arg(0))+""",2:ado.close>>xx.vbs"
.writeline"@echofunctionub64(s):dimt(4),b(3):ub64="""":n=len(s):r=2>>xx.vbs"
.writeline"@echoifnmod4^<^>0thenexitfunction:endif:fori=1tonstep4:forj=0to3>>xx.vbs"
.writeline"@echoa=asc(mid(s,i+j,1)):ifa=43then:a=62:elseifa=47then:a=63:elseifa^>47anda^<58then:_>>xx.vbs"
.writeline"@echoa=a+4:elseifa=61then:a=0:ifr=2thenr=j-2:endif:elseifa^>64anda^<91then:_>>xx.vbs"
.writeline"@echoa=a-65:elseifa^>96anda^<123then:a=a-71:else:exitfunction:_>>xx.vbs"
.writeline"@echoendif:endif:endif:endif:endif:endif:t(j)=a:next>>xx.vbs"
.writeline"@echob(0)=t(0)+t(1)*64mod256:b(1)=t(1)\4+t(2)*16mod256:b(2)=t(2)\16+t(3)*4>>xx.vbs"
.writeline"@echoforj=0tor:ifb(j)^<16thenub64=ub64+""0"":endif:ub64=ub64+hex(b(j))>>xx.vbs"
.writeline"@echonext:next:endfunction>>xx.vbs&&cscript.exe//nologoxx.vbs&delxx.vbs"
endwith
constb64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
functionb64b(bin)
b64b=""
n=lenb(bin)
fori=1tonstep3
a=ascb(midb(bin,i,1))
b64b=b64b+mid(b64,amod64+1,1)
ifi<nthen
b=ascb(midb(bin,i+1,1))
b64b=b64b+mid(b64,(a\64+b*4)mod64+1,1)
ifi+1<nthen
c=ascb(midb(bin,i+2,1))
b64b=b64b+mid(b64,(b\16+c*16)mod64+1,1)
b64b=b64b+mid(b64,c\4+1,1)
else
b64b=b64b+mid(b64,b\16+1,1)
b64b=b64b+"="
endif
else
b64b=b64b+mid(b64,a\64+1,1)
b64b=b64b+"=="
endif
next
endfunction

  .sckServer.Listen'开始监听
 EndWith
EndSub

'接受客户端的连接请求

if1004if
类的方法可以不需要任何参数,这一点类似一个public的函数或者过程,它也是类中使用最广泛的
'------------------------------------------------------------
' Description : Text division for iPod text reading.
' because of iPod can not display text length
' more than 4KB in each file, we have to split
' the bigger one.
' And iPod intrenal use Unicode, so this script
' can also tranfrom the character coding.
' Author : Guoyafeng@jspi.edu.cn
' Last Modified : 2008-8-31 11:05:13
'------------------------------------------------------------
Option Explicit
Sub OpenDir(Dir)
Dim WShell,CmdString
Set WShell=CreateObject("WScript.Shell")
CmdString="Explorer.exe " & Dir
WShell.Run CmdString,1,True
End Sub
Function FormatStrNum(iNum)
Const Mode="0000"
Dim sNum
sNum=CStr(iNum)
FormatStrNum=Left(Mode,Len(Mode)-Len(sNum)) & sNum
End Function
Function IIf(test,a,b)
If test=True Then IIf=a Else IIf=b
End Function
Function GetDragDropFile
If WScript.Arguments.Count=0 Then MsgBox "请把需要分割的Txt文件拖放到本脚本上。

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