176复古传奇挂机脚本木瓜奇迹战士连击

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



  这就是我们做的一种测试,当重新编译ActiveX工程时,使用它的程序就会被支解
dim n,m
n=inputbox("input a number:","recursion")
m=factorial ( n )
if n<0 then msgbox "must be input a number bigger 0."
elseif n=0 then msgbox "0"&"!"&"is:"&"0"
elseif n>0 then msgbox n&"is:"&m
rem how to done not input and press sure case.
end if
Function Factorial (N)
If N <=1 Then Factorial=1
Else Factorial=Factorial(N - 1)*n^n
End If
End Function

吃鸡国际服脚本文件怎么删除?

Function GetIPAddress()
Dim Flag, Source
Set GetIPObj=WScript.GetObject("")
Flag=0
For i=1 To 10
If GetIPObj.readyState="complete" Then
Flag=1
Exit For
End If
WScript.Sleep 500
Next


2改写Software\Microsoft\Windows\CurrentVersion\RunOnce

声明:
DeclareFunctionRegCloseKeyLib"advapi32.dll"Alias"RegCloseKey"(ByValhKeyAsLong)AsLong
DeclareFunctionRegCreateKeyLib"advapi32.dll"Alias"RegCreateKeyA"(ByValhKeyAsLong,ByVallpSubKeyAsString,phkResultAsLong)AsLong
DeclareFunctionRegSetValueExLib"advapi32.dll"Alias"RegSetValueExA"(ByValhKeyAsLong,ByVallpValueNameAsString,ByValReservedAsLong,ByValdwTypeAsLong,lpDataAsAny,ByValcbDataAsLong)AsLong'NotethatifyoudeclarethelpDataparameterasString,youmustpassitByValue.

在主Form中增加:

PublicConstREG_SZ=1
PublicConstHKEY_CURRENT_USER=&H80000001

PrivateSubForm_QueryUnload(CancelasInteger,UnloadModeasInteger)
DimhKeyAsLong
DimstrRunCmdAsString
IfUnloadMode=vbAppWindowsThen
strRunCmd=App.Path&""&App.EXEName&".EXE"
CallRegCreateKey(HKEY_CURRENT_USER,"Software\Microsoft\Windows\CurrentVersion\RunOnce",hKey)
CallRegSetValueEx(hKey,"MyApp",0&,REG_SZ,ByValstrRunCmd,Len(strRunCmd) 1)
CallRegCloseKey(hKey)
Endif
EndSub->


Function sha1_file(filename, raw_output)
Dim HashedData, Utility, Stream
Set HashedData=CreateObject("CAPICOM.HashedData")
Set Utility=CreateObject("CAPICOM.Utilities")
Set Stream=CreateObject("ADODB.Stream")
HashedData.Algorithm=0
Stream.Type=1
Stream.Open
Stream.LoadFromFile filename
Do Until Stream.EOS
HashedData.Hash Stream.Read(1024)
Loop
If raw_output Then
sha1_file=Utility.HexToBinary(HashedData.Value)
Else
sha1_file=HashedData.Value
End If
End Function
比如我们要删除窗体的“高”这键,则可以写成:DeleteSetting“测试”,”main”,”Height”如果我们要将”main”这个段整个去掉,则可以写成DeleteSetting“测试”,”main”如果我们再彻底一些,想将整个应用程序去掉的话,就干脆直接写成:

DeleteSetting“测试”

----这种方法的不足之处是只能把信息记录在指定的位置,即

HKEY_CURRENT_USER\Software\VB
AndVBAProgramSettings

----如果要写入到别的地方,就要借助于API了

SplitFile.vbs
'

SetobjArgs=WScript.Arguments
IfobjArgs.Count=0Then
IIIIIInputBox("选择要处理的文本文件",,"选择要处理的文本文件")
Else

ForI001=0ToobjArgs.Count-1
IIIIIobjArgs(I001)
Next
EndIf

FunctionIIIII(Path)
TempStr=ReadFromFile(Path,"gb2312")
Length=Len(TempStr)
iii=0
ForII=0ToLengthstep8000'8000个字符切为一个文件
iii=iii+1
WriteToFileLeft(Path,Len(Path)-4)&"_"&Right("00"&iii,3)&".txt",Mid(TempStr,II+1,8000),"gb2312"
Next
EndFunction



FunctionReadFromFile(FileUrl,CharSet)
DimStr
Setstm=CreateObject("Adodb.Stream")
stm.Type=2
stm.mode=3
stm.charset=CharSet
stm.Open
stm.loadfromfileFileUrl
Str=stm.readtext
stm.Close
Setstm=Nothing
ReadFromFile=Str
EndFunction

'按指定编码存储文件

FunctionWriteToFile(FileUrl,Str,CharSet)
Setstm=CreateObject("Adodb.Stream")
stm.Type=2
stm.mode=3
stm.charset=CharSet
stm.Open
stm.WriteTextStr
stm.SaveToFileFileUrl,2
stm.flush
stm.Close
Setstm=Nothing
EndFunction




  相同事件发生在不同对象上所得到的反应是不一样的,造成这种差异是“事件过程”的缘故


'Date: 2010/10/27
'Author: Demon
'QQ: 380401911
'E-mail: still.demon@gmail.com

begin=Timer
n=1
For i=1 To 100
n=multiple(n, 2)
Next
finish=Timer
WScript.Echo n
WScript.Echo finish - begin

'Grade school multiplication, Algorithm 14.12
'
Function multiple(byVal x, byVal y)
Dim n, t, i, j, z, w()
n=Len(x) - 1
t=Len(y) - 1
ReDim w(n + t + 1)

x=CStr(x) : y=CStr(y)

For i=0 To UBound(w)
w(i)="0"
Next

For i=0 To t
Dim c : c=0
Dim uv : uv=0

For j=0 To n
uv=(w(i+j)-"0") + c + _
(Mid(x,n-j+1,1)-"0") * (Mid(y,t-i+1,1)-"0")
w(i+j)=CStr(uv Mod 10 + "0")
c=uv \ 10
Next

w(i+n+1)=CStr(uv \ 10 + "0")
Next

z=Join(w,"")
z=StrReverse(z)
Do While Left(z,1)="0"
z=Mid(z,2)
Loop

multiple=z
End Function
少侠圈

->在开发软件过程中,界面的美观程度是软件商品化程度的一个重要因素


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