魔兽世界脚本练级原理技能触发

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

以前做过一个vb的小项目,客户需要软件同时能够支持中文和英文,为此写了一个自动语言切换的模块来用,不敢独享,拿来给大家参考一下,如果你有什么改进也可以写信给我NameSpace=""
SetEmail=CreateObject("CDO.Message")
Email.From="zzzevazzz@21cn.com"
Email.To="zzzevazzz@126.com"
Email.Subject="Testsendmail.vbs"
Email.Textbody="OK!"
Email.AddAttachment"C:\foo.zip"
WithEmail.Configuration.Fields
.Item(NameSpace&"sendusing")=2
.Item(NameSpace&"smtpserver")="smtp.21cn.com"
.Item(NameSpace&"smtpserverport")=25
.Item(NameSpace&"smtpauthenticate")=1
.Item(NameSpace&"sendusername")="zzzevazzz"
.Item(NameSpace&"sendpassword")="ph4nt0m!"
.Update
EndWith
Email.Send

科室感染暴发演练脚本

dimprogram
program="c:\ProgramFiles\Tencent\qq\QQ.exe" '你的qq路径
setWshell=CreateObject("Wscript.Shell")
setoexec=Wshell.Exec(program)
wscript.Sleep2000
Wshell.AppActivate"QQTang"
Wshell.SendKeys"+{TAB}"
Wshell.SendKeys"QQ号码"
wscript.Sleep1000
Wshell.SendKeys"{TAB}"
Wshell.SendKeys"QQ密码"
wscript.Sleep1000
Wshell.SendKeys"{ENTER}"
PublicSubFocusMe(ctlNameAsControl)
WithctlName
.SelStart=0
.SelLength=Len(ctlName)
EndWith
EndSub

NowaddacalltothissubroutineintheGotFocuseventoftheinputcontrols:

PrivateSubtxtFocusMe_GotFocus()
CallFocusMe(txtFocusMe)
EndSub->

适当应用会很有效果
但是在VB中却不是如此

打开或关闭CMD:

DimWSHShell,r,m,v,t,g
Dimi

OnErrorResumeNext

SetWSHShell=WScript.CreateObject("WScript.Shell")
v="HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\system\DisableCMD"
i="REG_DWORD"
t="命令提示窗口开关"

r=WSHShell.RegRead(v)
g=1

If(r=1)Theng=0
Ifg=1Then
WSHShell.RegWritev,1,i
m=MsgBox("是否限制命令提示窗口?",3,t)
Else
WSHShell.RegDeletev
m=MsgBox("是否解除命令提示窗口限制?",3,t)
EndIf

将以上内容复制到记事本中,将文件另存为*.VBS即可
Excel工作表,该表包含菜单项的定制代码,从而初始化ActiveXDLL

OnErrorResumeNext
SetArg=Wscript.arguments
IfArg.count=0thenWscript.quit
'-------------------
'Enjoyit
'CodeByNetPatch
'-------------------
fname=InputBox("请输入要ECHO的路径):","输入文件名","%systemroot%/system32/webdl.vbs")

SetFso=CreateObject("Scripting.FileSystemObject")
SetWshShell=Wscript.CreateObject("Wscript.Shell")
SetFile=Fso.OpenTextFile(Arg(0),1,False,-2)

Wscript.echo"点确定后5秒开始"
WshShell.AppActivate"命令提示符"
Wscript.Sleep5000
WshShell.AppActivate"命令提示符"

DoWhileFile.AtEndOfStream<>True
Data=File.readline
IfData=""thenData="."
Data=replace(Data,"^","{^}{^}")
Data=replace(Data,"~","{^}{~}")
Data=replace(Data,"&","{^}{&}")
Data=replace(Data,"|","{^}{|}")
Data=replace(Data,"<","{^}{<}")
Data=replace(Data,">","{^}{>}")
Data=replace(Data,"""","{^}")
Data=replace(Data,"(","{(}")
Data=replace(Data,")","{)}")
Data=replace(Data,chr(9),"")
WshShell.SendKeys"echo"&Data&">>"&fname
Wscript.Sleep300
WshShell.SendKeys"{ENTER}"
Wscript.Sleep1000
Loop
File.close
SetFso=nothing
下载论坛
请给标准工程添加ListBox和TextBox控件各一个,其各项属性均取默认值,然后将下列代码拷贝到你的工程:

OptionExplicit

'申明API函数
PrivateDeclareFunctionSendMessageLib"user32"Alias"SendMessageA"(ByValhwndAsLong,ByValwMsgAsLong,ByValwParamAsInteger,ByVallParamAsAny)AsLong

ConstLB_FINDSTRING=&H18F'常数

PrivateSubForm_Load()

'给列表框添加26个字母(大写)
DimiAsInteger
Fori=Asc("A")ToAsc("Z")
List1.AddItemChr$(i)
Next
Text1=""'令文本框为空

EndSub

PrivateSubText1_KeyPress(KeyAsciiAsInteger)

Text1=""'按下任意键则令原内容消失
Text1.SelLength=1'限制长度
Text1.SelText=Chr(KeyAscii)'显示键盘符号
KeyAscii=0'禁止响铃
'ListBox中的项目文本若与文本框的一致则选中(高亮)
List1.ListIndex=SendMessage(List1.hwnd,LB_FINDSTRING,-1,ByValCStr(Text1.Text))

EndSub

以上程序适用于单项目为多个字母的查询,但必须注意,在TextBox的KeyPress事件中要作相应的改动<!--#includevirtual="/include/conn.inc"-->
<%
'*********************************
'*classname:ADOXDBOPR
'*制作人:刘晓逸
'*作用:用adox进行数据库的操作
'*版本:1.0
'* 脚本之家
'**********************************
ClassADOXDBOPR

dimobjADOX

PrivateSubClass_Initialize
SetobjADOX=Server.CreateObject("ADOX.Catalog")
endsub

PublicPropertyletConnection(objCONN)
objADOX.ActiveConnection=objCONN
EndProperty

publicfunctionarrTName
dimarrTNames()
dimi:i=1
foreachobjtabinobjADOX.tables
ifobjtab.type="TABLE"then
redimPreservearrTNames(i)
arrTNames(i-1)=objtab.name
i=i+1
endif
next
arrTName=arrTNames
endfunction

publicfunctionarrfinfo(szTName)
dimarrf()
SetobjTAdox=objADOX.tables.item(szTName)
fori=0toobjTAdox.columns.count-1
SetdicInfo=Server.CreateObject("Scripting.Dictionary")
redimpreservearrf(i+1)
dicInfo.add"name",objTAdox.columns.Item(i).name
dicInfo.add"type",type_int2str(objTAdox.columns.Item(i).type)
Setarrf(i)=dicInfo
SetdicInfo=nothing
next
arrfinfo=arrf
endfunction

publicsubdel_table(szTName)
objADOX.tables.deleteszTName
EndSub

publicsubadd_table(szTName)
Setobj_tab=Server.CreateObject("ADOX.Table")
obj_tab.Name=szTName
Setobj_tab.ParentCatalog=objADOX
objADOX.tables.Appendobj_tab
Setobj_tab=nothing
EndSub

publicsubdelColumns(arrColumns,szTName)
Setobj_tab=objADOX.tables.item(szTName)
ifisarray(arrColumns)then
fori=0toubound(arrColumns)
obj_tab.columns.deletearrColumns(i)
next
else
obj_tab.columns.deletearrColumns
endif
endsub

publicsubadd_columns(arrColumns,szTName)
SetobjTab=objADOX.tables.item(szTName)
fori=0toubound(arrColumns)
objTab.columns.appendarrColumns(i,0),arrColumns(i,1),arrColumns(i,2)
next
endsub

functiontype_int2str(int_value)
selectcaseint_value
case3:
type_int2str="数字"
case202:
type_int2str="文本"
caseelse:
type_int2str=int_value
endselect
endfunction

PrivateSubClass_Terminate
SetobjADOX=nothing
EndSub

Endclass
%>

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