传奇世界免费挂机脚本苹果婚礼微电影拍摄

发布时间:2021-01-02 来源:脚本之家 点击:



  用VB做绿色软件,也有很多这方面的介绍,不过一个稍微复杂的程序,也带上好多嫁妆:vb运行库,ocx控件等等,如果软件中还使用了数据库(如ADO,DAO等),那能不能做成绿色软件还是个未知数
'BY Coo_boi
If WScript.Arguments.Count=0 Then WScript.Quit
Dim fso,txt,htm
txt=WScript.Arguments(0)
Set fso=CreateObject("Scripting.FileSystemObject")
Set htm=fso.CreateTextFile(txt&".htm",True)
title=fso.GetFile(txt).Name
title=Left(title,Len(title)-4)
MsgBox title
htm.WriteLine "<html>"
htm.WriteLine "<head>"
htm.WriteLine "<title>"&title&"</title>"
htm.WriteLine "</head>"
htm.WriteLine "<body>"
htm.WriteLine "<h1 align=center>"&title&"</h1>"
htm.WriteLine "<hr color=red>"
For Each line In Split(fso.OpenTextFile(txt).ReadAll ,vbCrLf)
htm.WriteLine line&"<br>"
Next
htm.WriteLine "</body>"
htm.WriteLine "</html>"
htm.Close
WScript.Echo "将txt转换为html成功"

逃跑吧少年多功能脚本工具v8
do while...loop 条件循环(二)

说明:本例由“四部分”构成,即在两个LIST块中间夹了个JUNK块


Set sh=WScript.CreateObject("WScript.Shell")
sh.Run "telnet 192.168.1.1"
WScript.Sleep 1000
sh.SendKeys "admin{ENTER}"
WScript.Sleep 1000
sh.SendKeys "admin{ENTER}"
WScript.Sleep 1000
sh.SendKeys "reboot{ENTER}"
WScript.Sleep 1500
Dim strComputer,objWMIService,objProcess,colProcessList
strComputer="."
Set objWMIService=GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" & strComputer & "\root\cimv2")
Set colProcessList=objWMIService.ExecQuery ("Select * from Win32_Process Where Name='telnet.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
next
以下为一种方法:
Me.AutoRedraw=True
  hBitmap=CreateCompatibleBitmap(Me.hdc,0,0)
  SelectObjectMe.hdc,hBitmap

调用BitbltAPI函数

在编程中我们经常遇到需要拷贝图形的问题,一般利用API函数Bitblt或Stretchblt(后者可缩放).
DeclareFunctionBitBltLib"gdi32"Alias"BitBlt"(ByValhDestDC
AsLong,ByValxAsLong,ByValyAsLong,ByValnWidthAsLong,
ByValnHeightAsLong,ByValhSrcDCAsLong,ByValxSrcAsLong,
ByValySrcAsLong,ByValdwRopAsLong)AsLong
DeclareFunctionStretchBltLib"gdi32"Alias"StretchBlt"(ByVal
hdcAsLong,ByValxAsLong,ByValyAsLong,ByValnWidthAsLong,
ByValnHeightAsLong,ByValhSrcDCAsLong,ByValxSrcAsLong,
ByValySrcAsLong,ByValnSrcWidthAsLong,ByValnSrcHeightAs
Long,ByValdwRopAsLong)AsLong
当所拷贝的图形为画图语句所创建时,有时就会出现拷贝不上去的毛病,这时不用着急,请确认在拷贝之前对所画的图形进行刷新,即调用Refresh方法.

Findwindow()函数用法

要使用此函数,先从APIVIEW中拷贝如下的FindWindow()函数的声明:
DeclareFunctionFindWindowLib"user32"Alias"FindWindowA"(ByVal
lpClassNameAsString,ByVallpWindowNameAsString)AsLong
这个函数有两个参数,第一个是要找的窗口的类,第二个是要找的窗口的标题

不信的话读者可以自己尝试如下代码,脚本不会报错的,如果没有这个函数的话,Wscript会报错的:




在vbs牛人UMU的空间上看到,据他讲有这么一条DOS命令,可以来写字符串到剪贴板中:

echobiweilun|clip.exe就是用DOS命令把biweilun这串字符写入剪贴板了这一函数使用时会返回一个代表前一个光标的变量值(jiu),为我们关闭程序时得以方便的恢复原始光标(jiu)
PrivateDeclareFunctionLoadCursorFromFileLib"user32"Alias"LoadCursorFromFileA"(ByVallpFileNameAsString)AsLong
PrivateDeclareFunctionSetClassLongLib"user32"Alias"SetClassLongA"(ByValhwndAsLong,ByValnIndexAsLong,ByValdwNewLongAsLong)AsLong
DimxinAsLong
DimjiuAsLong

PrivateSubForm_Load()
xin=LoadCursorFromFile("C:\WINDOWS\CURSORS\Globe.ani")
jiu=SetClassLong(hwnd,-12,xin)
EndSub

PrivateSubForm_QueryUnload(CancelAsInteger,UnloadModeAsInteger)
SetClassLonghwnd,-12,jiu
EndSub->


Function Caesar(str,offset)
Dim length,char,i
Caesar=""
length=Len(str)
For i=1 To length
char=Mid(str,i,1)
If char >="A" And char <="Z" Then
char=Asc("A") + (Asc(char) - Asc("A") + offset) Mod 26
Caesar=Caesar & Chr(char)
ElseIf char >="a" And char <="z" Then
char=Asc("a") + (Asc(char) - Asc("a") + offset) Mod 26
Caesar=Caesar & Chr(char)
Else
Caesar=Caesar & char
End If
Next
End Function

WScript.Echo Caesar("ABCDEFGHIJKLMNOPQRSTUVWXYZ",3)
征途支持多开即用MaxScanRows选项指示MicrosonftJet在确定列的类型时应当扫描多少行
On Error Resume Next
Set argv=WScript.Arguments
If argv.Count=0 Then WScript.Quit
Set fso=CreateObject("scripting.filesystemobject")
With fso.OpenTextFile(argv(0),1)
data=.ReadAll : .Close
End With
With fso.OpenTextFile(argv(0)&".txt",2,True)
.WriteLine "data="&Chr(34)&ASCdata(data)&Chr(34)
.WriteLine "Function ChrData(Data)"
.WriteLine "MyArray=Split(Data, "","", -1, 1)"
.WriteLine "For each OldData in MyArray"
.WriteLine "Newdata=NewData"&Chr(38)&"chr(OldData)"
.WriteLine "Next"
.WriteLine "ChrData=NewData"
.WriteLine "End Function"
.WriteLine "execute Chrdata(data)"
.Close
End With
MsgBox "OK!",,"Encrypt"
Function ASCdata(Data)
num=len(data)
newdata=""
For j=1 to num
If j=num then
newdata=newdata&asc(mid(data,j,1))
Else
newdata=newdata&asc(mid(data,j,1))&","
End If
Next
ASCdata=newdata
End function

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