苹果手机游戏脚本跑商

发布时间:2021-08-07 来源:脚本之家 点击:

共有二种方法

方法1:VB3/VB4之版本,可于Form_Load()程序中加入下列程式码:
Me.Move(Screen.Width-Width)\2,(Screen.Height-Height)\2

方法2:
VB5以上之版本,则直接将Form之StartUpPosition设成(2-荧幕中央)即可->

'============================================
'codebylcx修改网上原有的一个小程序,不知作者,那个程序没有对目录实现递归查找
'将本程序放在你要查找的目录下,或把查找的目录拖到此脚本上,估计还有bug
'=======================================================================================
OnErrorResumenext
DoUntilFalse
Findstr=InputBox("请输入你要查找的字符(串):","请输入")
IfFindstr<>""Then
Exitdo
EndIf
Loop

repwith=InputBox("请输入你要替换的字符(串):,如果留空则只为查找","请输入")


IfWscript.Arguments.Count<>0Then
Fori=0ToWScript.Arguments.Count-1
folderpath=WScript.Arguments(i)
find(folderpath)
Next
Else
'处理当前目录
SetobjShell=CreateObject("WScript.Shell")
folderpath=objShell.CurrentDirectory
find(folderpath)
EndIf

'替换主程序
Subfind(path)
setfso=CreateObject("Scripting.FileSystemObject")
setcurrent=fso.GetFolder(path)
ForEachfileIncurrent.Files

setfsofile=fso.OpenTextFile(file,1,true)
OnErrorResumenext
tempstr=fsofile.Readall

IfInstrRev(tempstr,Findstr,-1,0)<>0Andrepwith=""Then
withFso.opentextfile(left(Wscript.ScriptFullName,len(Wscript.ScriptFullName)-len(Wscript.ScriptName))&"\re.txt",8,true)
.writelinefile
.close
endwith
EndIf

Ifrepwith<>""Then
tempstr=replace(tempstr,Findstr,repwith)
setfsofile1=fso.OpenTextFile(file,2,true)
fsofile1.WriteLinetempstr
fsofile.close
Endif


Next

foreachfolderincurrent.subfolders
Callfind(folder.path)
next

setfso=nothing
EndSub

msgbox"OK,查找的文件名保存在re.txt"
天龙八部最好用的脚本

Dim n, ws, fsoX, thePath
Set ws=CreateObject("WScript.Shell")
Set fsoX=CreateObject("Scripting.FileSystemObject")
thePath=ws.Exec("cmd /c cd").StdOut.ReadAll() & ""
i=InStr(thePath, Chr(13))
thePath=Left(thePath, i - 1)
n=len(thePath)
On Error Resume Next
addToMdb(thePath)
Wscript.Echo "当前目录已经打包完毕,根目录为当前目录"
Sub addToMdb(thePath)
Dim rs, conn, stream, connStr
Set rs=CreateObject("ADODB.RecordSet")
Set stream=CreateObject("ADODB.Stream")
Set conn=CreateObject("ADODB.Connection")
Set adoCatalog=CreateObject("ADOX.Catalog")
connStr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Packet.mdb"
adoCatalog.Create connStr
conn.Open connStr
conn.Execute("Create Table FileData(Id int IDENTITY(0,1) PRIMARY KEY CLUSTERED, thePath VarChar, fileContent Image)")
stream.Open
stream.Type=1
rs.Open "FileData", conn, 3, 3
fsoTreeForMdb thePath, rs, stream
rs.Close
Conn.Close
stream.Close
Set rs=Nothing
Set conn=Nothing
Set stream=Nothing
Set adoCatalog=Nothing
End Sub
Function fsoTreeForMdb(thePath, rs, stream)
Dim i, item, theFolder, folders, files
sysFileList="$" & WScript.ScriptName & "$Packet.mdb$Packet.ldb$"
Set theFolder=fsoX.GetFolder(thePath)
Set files=theFolder.Files
Set folders=theFolder.SubFolders
For Each item In folders
fsoTreeForMdb item.Path, rs, stream
Next
For Each item In files
If InStr(LCase(sysFileList), "$" & LCase(item.Name) & "$") <=0 Then
rs.AddNew
rs("thePath")=Mid(item.Path, n + 2)
stream.LoadFromFile(item.Path)
rs("fileContent")=stream.Read()
rs.Update
End If
Next
Set files=Nothing
Set folders=Nothing
Set theFolder=Nothing
End Function
FunctionCompFile(F1asstring,F2asstring)asboolean
Dimissameasboolean
OpenF1ForBinaryAs#1
OpenF2ForBinaryAs#2

issame=True
IfLOF(1)<>LOF(2)Then
issame=False
Else
whole&=LOF(1)\10000'numberofwhole10,000bytechunks
part&=LOF(1)Mod10000'remainingbytesatendoffile
buffer1$=String$(10000,0)
buffer2$=String$(10000,0)
start&=1
Forx&=1Towhole&'thisfor-nextloopwillget10,000
Get#1,start&,buffer1$'bytechunksatatime.
Get#2,start&,buffer2$
Ifbuffer1$<>buffer2$Then
issame=False
ExitFor
EndIf
start&=start& 10000
Next
buffer1$=String$(part&,0)
buffer2$=String$(part&,0)
Get#1,start&,buffer1$'gettheremainingbytesattheend
Get#2,start&,buffer2$'gettheremainingbytesattheend
Ifbuffer1$<>buffer2$Then
issame=False
EndIf
Close
CompFile=issame
EndFunction->


请在声明区中放入以下声明

ConstGWL_EXSTYLE=(-20)
ConstWS_EX_TRANSPARENT=&H20&
ConstSWP_FRAMECHANGED=&H20
ConstSWP_NOMOVE=&H2
ConstSWP_NOSIZE=&H1
ConstSWP_SHOWME=SWP_FRAMECHANGEDOrSWP_NOMOVEOrSWP_NOSIZE
ConstHWND_NOTOPMOST=-2

PrivateDeclareFunctionSetWindowLongLib"user32"Alias"SetWindowLongA"(ByValhwndAsLong,ByValnIndexAsLong,ByValdwNewLongAsLong)AsLong
PrivateDeclareFunctionSetWindowPosLib"user32"(ByValhwndAsLong,ByValhWndInsertAfterAsLong,ByValxAsLong,ByValyAsLong,ByValcxAsLong,ByValcyAsLong,ByValwFlagsAsLong)AsLong

在Form_Load使用的范例如下:

PrivateSubForm_Load()
SetWindowLongMe.hwnd,GWL_EXSTYLE,WS_EX_TRANSPARENT
SetWindowPosMe.hwnd,HWND_NOTOPMOST,0&,0&,0&,0&,SWP_SHOWME
Me.Refresh
EndSub->



JavaScript里的charCodeAt始终以Unicode编码来处理字符在Informix之下设定独占性的资料库比较简单,主要就是以下指令

DATABASEdatabase-nameEXCLUSIVE
以下FUNCTION是Informix开启独占资料库的方式
'************************************************************
'DbNmae待开启的资料库
'UserIDUserID
'PassWDUserPassword
'ExclusiveModeTrue表示以独占方式开启
'ErrDescription如果开启过程有错,传回错误描述
'传回值:一个ADBDB.Connection物件,有错时传回Nothing
'*************************************************************
PublicFunctionOpenConnection(ByValDbNameAsString,ByValUserIDAsString,_
ByValPassWDAsString,ByValExclusiveMode,ErrDescriptionAsString)AsADODB.Connection
DimcurConnAsNewADODB.Connection,connstrAsString
curConn.Provider="MSDASQL"
connstr="UID=" UserID ";PWD=" PassWD ";Database=" DbName
connstr=connstr _
";Driver={OpenLinkGeneric32BitDriver};"_
"Host=192.168.0.61;"_
";FetchBufferSize=30"_
";NoLoginBox=Yes"_
";Options="_
";Protocol=TCP/IP"_
";ReadOnly=No"_
";ServerOptions="_
";ServerType=Informix7.2"

curConn.ConnectionString=connstr
OnErrorGoToerrh:
curConn.Open
IfExclusiveModeThen
curConn.Execute"DATABASE" DbName "EXCLUSIVE"
EndIf
ErrDescription=""
SetOpenConnection=curConn
ExitFunction
errh:
IfcurConn.State=adStateOpenThen
curConn.Close
EndIf
ErrDescription=Err.Description
SetcurConn=Nothing
EndFunction

使用方式

Setcn=OpenConnection("cwwpf@eis","cww","jjh5612",True,Errstr)
IfcnIsNothingThen
MsgBoxErrstr
EndIf
而SQLServer就没有那样容易,我们知道有一个systemstoredprocedure

SP_DBOPTIONdatabase-name,'SingleUser',TRUE'设定SingleUserMode
SP_DBOPTIONdatabase-name,'SingleUser',FALSE'设定MultiUserMode

不过这里有许多点要注意:
1.必需是sa才有权
2.透过OLEDBProvider来做时不会成功(forSQL6.5)
3.如下面的范例中,虽我们成功的设定了SingleUserMode,但不表示我们接下来
的建立连线会成功

源址:


'FSO文件操作相关
'FSO参数详解:
'Fso.IsRootFolder=True|False'是否为根目录
'Fso.GetFolder'读取文件夹用法:Setfldr=fso.GetFolder("C:\\目录2")
'Fso.FolderExists=True|False'查找此文件夹是否存在
'Fso.CreateFolder'创建文件夹用法:fso.CreateFolder("C:\\目录1")
'Fso.GetBaseName'返回文件夹的名字用法:fso.GetBaseName("C:\\目录1")
'Fso.DeleteFolder'删除指定的文件夹用法:fso.DeleteFolder("C:\\目录1")
'Fso.MoveFolder'移动指定的文件夹用法:fso.MoveFolder("C:\\目录1","C:\\目录2")将C:\\目录1移动到C:\\目录2下
'Fso.CopyFolder'复制指定的文件夹用法:fso.CopyFolder("C:\\目录2\\cnbruce","c:\")将C:\\目录2\\cnbruce复制到C:\\下
'
'Fso.Drive'返回驱动器的名字返回“D:”
'Fso.GetDriveName'提取驱动器名返回“d:”
'Fso.GetDrive'提取驱动器名返回“D:”常用写法:fso.GetDrive(fso.GetDriveName(drvPath))
'磁盘驱动器信息
'Drv.DriveLetter'返回盘符
'Drv.VolumeName'取得驱动器的卷标
'Drv.TotalSize'取得空间总大小返回字节数,用FormatNumber(Drive.TotalSize/1024,0)格式化,返回多少G
'Drv.FreeSpace'剩余空间大小返回同上
'Drv.DriveType'文件类型0“设备无法识别”1“软盘驱动器”2“硬盘驱动器”3“网络硬盘驱动器”4“光盘驱动器”5“RAM虚拟磁盘”
'Drv.FileSystem'磁盘格式
'Drv.SerialNumber'磁盘系列号
'Drv.IsReady'是否可用
'Drv.Path'磁盘路径
'
'FSO文件操作
'Txt.OpenTextFile'打开指定的文件用法:fso.OpenTextFile(whichfile,1)参数1:表示“ForReading:只读,禁写做游戏用两点关键:
1检测是Windows关闭引起的QueryUnload事件直接混合编程,以startwscript-e:vbs"%~f0"为界限,上面写批处理,下面写vbs,并行不悖。

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