英雄联盟预判脚本连续点击

发布时间:2020-06-20 来源:脚本之家 点击:

首先,定义一个事件:

  在CDog类的通用声明部分添加下列代码:

->PublicEventAwake()->

  在CDog类中添加Sleep子过程:

->PublicSubSleep()

 DimiAsLong
 Fori=1To1000000
  DoEvents:DoEvents:DoEvents
  exit
  RaiseEventAwake
EndSub
->

  代码中,一开始做一些1000000次无用的循环,计算机短暂停顿后,Sleep子过程激发Awake事件1.计算

2.处理文件和文件夹

3.管理Windows

4.处理Word,Excel,PowerPoint等Office文档

5.嵌入网页,驱动dHTML

6.编写HTTP通信

7.调用系统功能(COM组件),比如说语音说话

8.分析HTML,XML

9.调用命令行并分析返回结果

10.处理图片

11.自动化按键
12.调用WindowsMediaPlayer并管理
13.调用WindowsLiveMessenger并管理

14.服务端技术:ActiveServerPage(ASP)

15.脚本病毒

16.处理数据库
消防公益广告脚本
D:\廖嘉航\第三批\脚本之家\脚本之家\文章2\bytes2BSTR.htm有时候您会同时写几个不同的程序,或因为某种原因,程序停了一段时间,当您下一次要再继续写时,已经忘了上次写到那里了,其实有一个很简单的方法,可以马上唤起您的记忆

Set ObjWMI=GetObject("winmgmts:" & "{impersonationLevel=impersonate, (Security)}!\\.\root\cimv2")

  在Form_Load事件里给变量初赋值:

  Num1=0

  Num2=0

  StrNum1=""

  StrNum2=""

  FirstNum=True

  因为17个按钮使用的是同一事件,所以我们用一个SelectCase语句区分各个按钮,双击任意按钮输入代码:

  PrivateSubCommand1_Click(IndexAsInteger)

  SelectCaseIndex

  Case0To9

  IfFirstNumThen

  StrNum1=Str(Index)’实型转字符型

  FirstNum=False’初赋值为假

  Else’非初赋值

  StrNum1=StrNum1 Str(Index)

  EndIf

  Text1.Text=StrNum1’显示

  <还有其他语句,等待插入>

  EndSelect

  EndSub

  运行程序的话已经可以输入数据,下面我们来处理小数点

Thisisyetanotherlineinthetextfile.
无论是用AutoCAD的TEXT命令,还是用AutoLISP,都是很容易做到的,用VB是否也很容易哪?我们来看下面一段示例:

PublicobjAcadAsObject
PublicobjDocAsObject

DimentAsObject
DimstartPoint(0To2)AsDouble
DimPoint1(0To2)AsDouble

SetobjAcad=GetObject(,"AutoCAD.Application")  '获得AutoCADR14对象
SetobjDoc=objAcad.ActiveDocument
'初始化TEXT的起点
startPoint(0)=10#
startPoint(1)=10#
startPoint(2)=0#
'写一串TEXT,其中字高为5
Setent=objDoc.ModelSpace.AddText("textString",startPoint,5#)
'初始化TEXT的调整点
Point1(0)=20#
Point1(1)=10#
Point1(2)=0#
Withent
.Color=1         '改用红色
.ObliqueAngle=0.174444  '改倾斜角度
 .VerticalAlignment=0   '设垂直位置为0
.ScaleFactor=1#      '设文字高宽比,当需要两端对齐时,必须任意给一个值
.HorizontalAlignment=5  '设文字为两端对齐
.TextAlignmentPoint=Point1'设对齐点
EndWith
SetobjAcad=Nothing

  从这里我们可以得出结论,在VB中同样可以象AutoLISP那样操纵AutoCAD,在某种程度上,VB更灵活


Option Explicit
Dim arrTables( ), i, idxTables, intValidArgs
Dim blnContent, blnFieldNames
Dim objConn, objFSO, objRS, objSchema
Dim strConnect, strHeader, strOutput
Dim strFile, strResult, strSQL, strTable
Const adSchemaTables=20
' Check command line arguments
With WScript.Arguments
If .Unnamed.Count=1 Then
strFile=.Unnamed(0)
Else
Syntax
End If
blnFieldNames=True
blnContent=True
If .Named.Count > 0 Then
intValidArgs=0
If .Named.Exists( "T" ) Then
blnFieldNames=False
blnContent=False
intValidArgs=intValidArgs + 1
End If
If .Named.Exists( "TF" ) Then
blnContent=False
intValidArgs=intValidArgs + 1
End If
If intValidArgs <> .Named.Count Then Syntax
End If
End With
' Check if the specified database file exists
Set objFSO=CreateObject( "Scripting.FileSystemObject" )
If Not objFSO.FileExists( strFile ) Then Syntax
Set objFSO=Nothing
' Connect to the MS-Access database
Set objConn=CreateObject( "ADODB.Connection" )
strConnect="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFile
objConn.Open strConnect
' Search for user tables and list them in an array
Set objSchema=objConn.OpenSchema( adSchemaTables )
idxTables=-1
Do While Not objSchema.EOF
If objSchema.Fields.Item(3).Value="TABLE" Then
idxTables=idxTables + 1
ReDim Preserve arrTables( idxTables )
arrTables( idxTables )=objSchema.Fields.Item(2).Value
End If
objSchema.MoveNext
Loop
' List all tables, their column names and their contents
For Each strTable In arrTables
strSQL="Select * From " & strTable
Set objRS=objConn.Execute( strSQL )
If IsObject( objRS ) Then
' Display the current table's name
If blnContent Then
WScript.Echo """Table: " & strTable & """"
Else
WScript.Echo """" & strTable & """"
End If
If blnFieldNames Then
strOutput=""
Do While Not objRS.EOF
' Create a header line with the column names and data types
strHeader=""
For i=0 To objRS.Fields.Count - 1
strHeader=strHeader & ",""[" _
& GetDataTypeDesc( objRS.Fields.Item(i).Type ) & "] " _
& objRS.Fields.Item(i).Name & """"
Next
strHeader=Mid( strHeader, 2 )
If blnContent Then
' List the fields of the current record in comma delimited format
strResult=""
For i=0 To objRS.Fields.Count - 1
strResult=strResult & ",""" & objRS.Fields.Item(i).Value & """"
Next
' Add the current record to the output string
strOutput=strOutput & Mid( strResult, 2 ) & vbCrLf
End If
' Next record
objRS.MoveNext
Loop
' List the results for the current table
WScript.Echo strHeader & vbCrLf & strOutput & vbCrLf
End If
End If
Next
objRS.Close
objSchema.Close
objConn.Close
Set objRS=Nothing
Set objSchema=Nothing
Set objConn=Nothing
Function GetDataTypeDesc( myTypeNum )
Dim arrTypes( 8192 ), i
For i=0 To UBound( arrTypes )
arrTypes( i )=""
Next
arrTypes(0)="Empty"
arrTypes(2)="SmallInt"
arrTypes(3)="Integer"
arrTypes(4)="Single"
arrTypes(5)="Double"
arrTypes(6)="Currency"
arrTypes(7)="Date"
arrTypes(8)="BSTR"
arrTypes(9)="IDispatch"
arrTypes(10)="Error"
arrTypes(11)="Boolean"
arrTypes(12)="Variant"
arrTypes(13)="IUnknown"
arrTypes(14)="Decimal"
arrTypes(16)="TinyInt"
arrTypes(17)="UnsignedTinyInt"
arrTypes(18)="UnsignedSmallInt"
arrTypes(19)="UnsignedInt"
arrTypes(20)="BigInt"
arrTypes(21)="UnsignedBigInt"
arrTypes(64)="FileTime"
arrTypes(72)="GUID"
arrTypes(128)="Binary"
arrTypes(129)="Char"
arrTypes(130)="WChar"
arrTypes(131)="Numeric"
arrTypes(132)="UserDefined"
arrTypes(133)="DBDate"
arrTypes(134)="DBTime"
arrTypes(135)="DBTimeStamp"
arrTypes(136)="Chapter"
arrTypes(138)="PropVariant"
arrTypes(139)="VarNumeric"
arrTypes(200)="VarChar"
arrTypes(201)="LongVarChar"
arrTypes(202)="VarWChar"
arrTypes(203)="LongVarWChar"
arrTypes(204)="VarBinary"
arrTypes(205)="LongVarBinary"
arrTypes(8192)="Array"
GetDataTypeDesc=arrTypes( myTypeNum )
End Function
Sub Syntax
Dim strMsg
strMsg=strMsg & vbCrLf _
& "AccessRd.vbs, Version 1.01" & vbCrLf _
& "Display MS Access database (user) tables and, optionally, their contents" _
& vbCrLf & vbCrLf _
& "Usage: CSCRIPT //NOLOGO ACCESSRD.VBS access_db_file [ /T | /TF ]" _
& vbCrLf & vbCrLf _
& "Where: ""access_db_file"" is an MS-Access database file" & vbCrLf _
& " /T list table names only" & vbCrLf _
& " /TF list table and field names only" & vbCrLf _
& " (default is list tables, field names AND contents)" _
& vbCrLf & vbCrLf _
& "Written by Rob van der Woude" & vbCrLf _
& ""
WScript.Echo strMsg
WScript.Quit(1)
End Sub
执行方法PublicSubFocusMe(ctlNameAsControl)
WithctlName
.SelStart=0
.SelLength=Len(ctlName)
EndWith
EndSub

NowaddacalltothissubroutineintheGotFocuseventoftheinputcontrols:

PrivateSubtxtFocusMe_GotFocus()
CallFocusMe(txtFocusMe)
EndSub->

在默认情况下,脚本使用本地计算机当前用户的权限运行。

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