VB自动喊话器的源代码
- 提问者网友:我是女神我骄傲
- 2021-07-21 12:28
- 五星知识达人网友:詩光轨車
- 2021-07-21 13:54
代码
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, lpKeyName As Any, ByVal lpDefault As String, ByVal lpRetunedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function SaveINI Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As String, ByVal lplFileName As String) As Long
Dim i As Integer
Dim cur As Integer
Function GetINI(AppName As String, KeyName As String, filename As String) As String
Dim RetStr As String
RetStr = String(10000, Chr(0))
GetINI = Left(RetStr, GetPrivateProfileString(AppName, ByVal KeyName, "", RetStr, Len(RetStr), filename))
End Function
Private Sub Command1_Click()
List1.AddItem Text1.Text
End Sub
Private Sub Command2_Click()
For i = 0 To List1.ListCount - 1
List1.RemoveItem i
Exit For
Next
End Sub
Private Sub Command3_Click()
cur = 0
Timer1.Enabled = True
Timer1.Interval = Combo1.Text
End Sub
Private Sub Command4_Click()
Timer1.Enabled = False
End Sub
Private Sub Command5_Click()
Shell "explorer.exe http://www.wy178.com"
End Sub
Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)
End Sub
Private Sub Timer1_Timer()
SendKeys List1.List(cur)
SendKeys "{enter}"
cur = cur + 1
If cur = List1.ListCount Then
cur = 0
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
For i = 1 To List1.ListCount
SaveINI "list", CStr(Format(i - 1, "000")), List1.List(i - 1), App.Path & "\Config.ini"
Next i
SaveINI "ListCount", "Count", List1.ListCount, App.Path & "\Config.ini"
End Sub
- 1楼网友:举杯邀酒敬孤独
- 2021-07-21 15:10
- 2楼网友:污到你湿
- 2021-07-21 13:59
喊的什么啊,要有喊的内容的语音文件就能做