Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Chat Macro Halp
#1
So i made one to bug the fuck outta a few of my friends, because they think they're hotshit with the CTRL + V'ing. However, the problem is, when I set the interval pretty much anywhere below 1000 for my timer, it because almost impossible to stop this program of mine, and I have to struggle to get task manager open to get it closed. I tried adding hotkeys, so that I can just push esc, and it will stop the timer, but I can't have the form displayed, without it auto choosing one of the buttons. Is there anyway, I can make it so that I can get the program up without it selecting one of the buttons? I have all the code enclosed below. Any help would be greatly appreciated.

[spoiler]
Code:
Option Explicit

Private Sub cmdstart_Click()
    On Error Resume Next

    If Not IsNumeric(txtinterval.Text) Then
        Call MsgBox("Interval must be a number pl0x", vbOKOnly, "Error")
        Exit Sub
    End If
    
    If txtinterval.Text < 1000 Then
        If MsgBox("Any interval lower than a 1000, may make it more difficult to stop the app. Do you want to proceed with this interval?", vbYesNo, "Confirmation") = vbNo Then
            Exit Sub
        End If
    End If
    
    Timer1.Enabled = True
End Sub

Private Sub cmdStop_Click()
    On Error Resume Next
    Timer1.Enabled = False
End Sub

Private Sub Form_Load()
    On Error Resume Next
    Timer1.Enabled = False
End Sub

Private Sub Halp_Click()
    frmhalp.Show
End Sub

Private Sub Timer1_Timer()
    On Error Resume Next
    Timer1.Interval = txtinterval.Text
    
    '    AppActivate (txtuser.Text)
    
    SendKeys txtmsg.Text

    SendKeys "{enter}"
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, _
                         Shift As Integer)
    'make sure KeyPreview is True on Form Properties
    On Error Resume Next

    Select Case KeyCode

        Case vbKeyF1 'Then Find which key you want to use from the list below
            'Code to run when key is pressed
            frmhalp.Show
    End Select

End Sub
[/spoiler]
Reply
#2
Care to elaborate? I googled it, but couldn't understand it much. :\
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)