魔兽工作室脚本liunx

发布时间:2021-12-20 来源:脚本之家 点击:

INI文件是系统、应用程序的配置文件

按键精灵脚本不循环

Set oIE=CreateObject("InternetExplorer.Application")
oIE.Navigate ""
Do
WScript.Sleep 200
Loop Until Not oIE.Busy And oIE.ReadyState=4
'下面你可以把它写到文件里面去,Adodb.Stream和Scripting.FileSystemObject都可以
WScript.echo "<HTML>" & oIE.Document.body.OuterHTML & _
"</HTML>"
oIE.Quit
Set oIE=Nothing


OptionExplicit
PrivateConstNCBASTAT=&H33
PrivateConstNCBNAMSZ=16
PrivateConstHEAP_ZERO_MEMORY=&H8
PrivateConstHEAP_GENERATE_EXCEPTIONS=&H4
PrivateConstNCBRESET=&H32

PrivateTypeNCB
  ncb_commandAsByte'Integer
  ncb_retcodeAsByte'Integer
  ncb_lsnAsByte'Integer
  ncb_numAsByte'Integer
  ncb_bufferAsLong'String
  ncb_lengthAsInteger
  ncb_callnameAsString*NCBNAMSZ
  ncb_nameAsString*NCBNAMSZ
  ncb_rtoAsByte'Integer
  ncb_stoAsByte'Integer
  ncb_postAsLong
  ncb_lana_numAsByte'Integer
  ncb_cmd_cpltAsByte'Integer
  ncb_reserve(9)AsByte'Reserved,mustbe0
  ncb_eventAsLong
EndType

PrivateTypeADAPTER_STATUS
  adapter_address(5)AsByte'AsString*6
  rev_majorAsByte'Integer
  reserved0AsByte'Integer
  adapter_typeAsByte'Integer
  rev_minorAsByte'Integer
  durationAsInteger
  frmr_recvAsInteger
  frmr_xmitAsInteger
  iframe_recv_errAsInteger
  xmit_abortsAsInteger
  xmit_successAsLong
  recv_successAsLong
  iframe_xmit_errAsInteger
  recv_buff_unavailAsInteger
  t1_timeoutsAsInteger
  ti_timeoutsAsInteger
  Reserved1AsLong
  free_ncbsAsInteger
  max_cfg_ncbsAsInteger
  max_ncbsAsInteger
  xmit_buf_unavailAsInteger
  max_dgram_sizeAsInteger
  pending_sessAsInteger
  max_cfg_sessAsInteger
  max_sessAsInteger
  max_sess_pkt_sizeAsInteger
  name_countAsInteger
EndType

PrivateTypeNAME_BUFFER
  nameAsString*NCBNAMSZ
  name_numAsInteger
  name_flagsAsInteger
EndType

PrivateTypeASTAT
  adaptAsADAPTER_STATUS
  NameBuff(30)AsNAME_BUFFER
EndType

PrivateDeclareFunctionNetbiosLib"netapi32.dll"(pncbAsNCB)AsByte
PrivateDeclareSubCopyMemoryLib"kernel32"Alias"RtlMoveMemory"(hpvDestAsAny,ByValhpvSourceAsLong,ByValcbCopyAsLong)
PrivateDeclareFunctionGetProcessHeapLib"kernel32"()AsLong
PrivateDeclareFunctionHeapAllocLib"kernel32"(ByValhHeapAsLong,ByValdwFlagsAsLong,ByValdwBytesAsLong)AsLong
PrivateDeclareFunctionHeapFreeLib"kernel32"(ByValhHeapAsLong,ByValdwFlagsAsLong,lpMemAsAny)AsLong

把下面的代码放入Command1_Click的事件中:

PrivateSubCommand1_Click()
  DimmyNcbAsNCB
  DimbRetAsByte
  myNcb.ncb_command=NCBRESET
  bRet=Netbios(myNcb)
  myNcb.ncb_command=NCBASTAT
  myNcb.ncb_lana_num=0
  myNcb.ncb_callname="*      "
  DimmyASTATAsASTAT,tempASTATAsASTAT
  DimpASTATAsLong
  myNcb.ncb_length=Len(myASTAT)
  Debug.PrintErr.LastDllError
  pASTAT=HeapAlloc(GetProcessHeap(),HEAP_GENERATE_EXCEPTIONSOrHEAP_ZERO_MEMORY,myNcb.ncb_length)
  IfpASTAT=0Then
    Debug.Print"memoryallcoationfailed!"
    ExitSub
  EndIf
  myNcb.ncb_buffer=pASTAT
  bRet=Netbios(myNcb)
  Debug.PrintErr.LastDllError
  CopyMemorymyASTAT,myNcb.ncb_buffer,Len(myASTAT)
  MsgBoxHex(myASTAT.adapt.adapter_address(0))&""&Hex(myASTAT.adapt.adapter_address(1))_
    &""&Hex(myASTAT.adapt.adapter_address(2))&""_
    &Hex(myASTAT.adapt.adapter_address(3))_
    &""&Hex(myASTAT.adapt.adapter_address(4))&""_
    &Hex(myASTAT.adapt.adapter_address(5))
  HeapFreeGetProcessHeap(),0,pASTAT
EndSub

4)按F5,运行该程序


'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

下面分别对各组选项加以说明:

A、“打开/另存为”:

  对话框标题是“打开/另存为”窗体的标题,如打开文件时可输入“打开文件”,另存文件时可输入“保存文件”


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
口令不正确

我们调用ReadAll方法以将此文件的全部内容读取到变量strContents中,然后使用Close方法关闭文件天命之子PublicConstVK_TAB=&H9
PublicDeclareSubkeybd_eventLib"user32"(ByValbVkAsByte,ByValbScanAsByte,ByValdwFlagsAsLong,ByValdwExtraInfoAsLong)

PrivateSubText1_KeyPress(KeyAsciiAsInteger)
IfKeyAscii=vbKeyReturnThen
KeyAscii=0
keybd_eventVK_TAB,0,0,0
EndIf
EndSub->

首先呢,找到迅雷在IE右健添加的东东:“用迅雷下载链接”。

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