欢迎访问infoheader的Blog——年华似水浪淘沙
E-mail:infoheader@gmail.com
GTalk:infoheader@gmail.com
来自fanfou:

2008年12月8日星期一

自动灌水软件代码

从我在0Gsns的日志复制过来的。
==================================================================
今天无聊到底了。。。于是去hnubbs灌水了。。。于是就有了这个软件。

Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
'Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, _
ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)

Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
'Private Const MOUSEEVENTF_RIGHTDOWN = &H8
'Private Const MOUSEEVENTF_RIGHTUP = &H10

Private Type POINTAPI
X As Long
Y As Long
End Type

Private Sub Command1_Click()
SendKeys "{PGDN}", 100
ML
SendKeys Text1.Text
SendKeys "^{enter}", 100
End Sub

Private Sub Command2_Click()
Timer1.Enabled = Not Timer1.Enabled
Command2.Caption = Timer1.Enabled
End Sub

Private Sub Command3_Click()
List1.AddItem Text1.Text
End Sub

Private Sub Command4_Click()
On Error Resume Next
List1.RemoveItem List1.ListIndex
End Sub

Private Sub Form_Load()
On Error Resume Next
Dim I As Integer, N As Integer, T As String
Open App.Path & "\list.txt" For Input As #1
Input #1, N
For I = 1 To N
Input #1, T
List1.AddItem T
Next
Close #1
End Sub

Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
Dim I As Integer
Open App.Path & "\list.txt" For Output As #1
Write #1, List1.ListCount
For I = 0 To List1.ListCount - 1
Write #1, List1.List(I)
Next
Close #1
End Sub

Private Sub HScroll1_Change()
Label1.Caption = "速度:" & HScroll1.Value & "秒/次"
Timer1.Interval = HScroll1.Value * 1000
End Sub

Private Sub Image1_Click()
Shell "explorer.exe http://www.0ginr.com/"
End Sub

Private Sub Label3_Click()
Shell "explorer.exe http://bbs.hnubbs.com/"
End Sub

Private Sub Timer1_Timer()
Text1.Text = List1.List(Int(Rnd() * List1.ListCount))
Command1_Click
End Sub

Private Sub ML()
Dim MouseCurPos As POINTAPI
GetCursorPos MouseCurPos
mouse_event MOUSEEVENTF_LEFTDOWN, MouseCurPos.X, MouseCurPos.Y, 0, 0 '设置鼠标左键按下
mouse_event MOUSEEVENTF_LEFTUP, MouseCurPos.X, MouseCurPos.Y, 0, 0 '设置鼠标左键弹出
End Sub

2 条评论:

匿名 说...

我的BLOG也换地址了~
http://dasparion.cn/blog
你的链接我已经添加了~如果你有LOGO就告诉我地址 我好给你加上LOGO~
QQ:6905886

infoheader 说...

暂时没有Logo,旧Logo废弃不用了。
我对你的链接已经更改。