Imports System****Public Class Booster
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Function GetAsyncKeyState(keys As Keys) As Boolean
Throw New NotImplementedException
End Function
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs)
Timer1.enabled = True
Timer1.Interval = 1
Timer2.Enabled = True
Timer2.Interval = 1
End Sub
Private Sub AdvantiumTheme1_Click(sender As System.Object, e As System.EventArgs) Handles AdvantiumTheme1.Click
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Close()
End Sub
Private Sub AdvantiumButton2_Click(sender As System.Object, e As System.EventArgs) Handles AdvantiumButton2.Click
If Directory.Exists("\Program Files (x86)") Then
Process.Start("run.bat")
Else
If Directory.Exists("\Program Files") Then
Process.Start("run32.bat")
End If
End If
End Sub
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Dim Hotkey1 As Boolean
Hotkey1 = GetAsyncKeyState(Keys.F5)
If Hotkey1 = True Then
SendKeys.Send("{Enter}")
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{Enter}")
Else
Dim Hotkey2 As Boolean
Hotkey2 = GetAsyncKeyState(Keys.F6)
If Hotkey2 = True Then
SendKeys.Send("{Enter}")
SendKeys.Send(TextBox2.Text)
SendKeys.Send("{Enter}")
End If
End If
End Sub
Private Sub Timer2_Tick(sender As System.Object, e As System.EventArgs) Handles Timer2.Tick
Dim Hotkey3 As Boolean
Hotkey3 = GetAsyncKeyState(Keys.End)
If Hotkey3 = True Then
Close()
End If
End Sub
End Class
Dim Hotkey1 As Boolean Dim Hotkey2 As Boolean Dim Hotkey3 As Boolean
If GetAsyncKeyState(Keys.F5) Then
SendKeys.Send("{Enter}")
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{Enter}")
End If
If GetAsyncKeyState(Keys.F6) Then
SendKeys.Send("{Enter}")
SendKeys.Send(TextBox2.Text)
SendKeys.Send("{Enter}")
End If
If GetAsyncKeyState(Keys.End) Then
Close()
End If
IIf(Directory.Exists("\Program Files (x86)"), Process.Start("run.bat"), Process.Start("run32.bat"))
Imports System****
Public Class Booster
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs)
Timer1.Enabled = True
Timer1.Interval = 1
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Close()
End Sub
Private Sub AdvantiumButton2_Click(sender As System.Object, e As System.EventArgs) Handles AdvantiumButton2.Click
IIf(Directory.Exists("\Program Files (x86)"), Process.Start("run.bat"), Process.Start("run32.bat"))
End Sub
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
If GetAsyncKeyState(Keys.F5) Then
SendKeys.Send("{Enter}")
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{Enter}")
End If
If GetAsyncKeyState(Keys.F6) Then
SendKeys.Send("{Enter}")
SendKeys.Send(TextBox2.Text)
SendKeys.Send("{Enter}")
End If
If GetAsyncKeyState(Keys.End) Then
Close()
End If
End Sub
End Class
Private Sub AdvantiumTheme1_Click(sender As System.Object, e As System.EventArgs) Handles AdvantiumTheme1.Click
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Close()
End Sub
Private Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vkey As Long) As Integer Private Function GetTime(ByVal _Event As String, ByVal _Starter As String, Optional ByVal _Enclose As Boolean = True, Optional ByVal _Chars As Integer = 0) As String 'Function to retun time // _Event can be used for what happened // _Starter if you want to use chars before time is displayed
If _Enclose = True Then 'If you to enclose the time in characters
Dim A() As String 'Declare an array
Dim B As String 'Declare a string
B = _Starter.Insert(_Chars, "&") 'Insert a character for us to split into an array 'A()'
A = B.Split("&") 'Split
GetTime = A(0) & My.Computer.Clock.LocalTime & A(1) & " - " & _Event 'Finally, returning (i.e - [TIME] - EVENT
Else 'If _Enclose = false
GetTime = _Starter & My.Computer.Clock.LocalTime & " - " & _Event 'Return (i.e - []- TIME - EVENT
'Theres plenty of options for the time to be displayed as
End If
End Function
Private Sub StartProgram(ByVal _ProgramPath As String)
Shell(_ProgramPath, AppWinStyle.NormalFocus, True, 10000) 'Start a program, focused in windowed mode normal, waiting for program with 10sec timeout
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
If GetAsyncKeyState(Keys.F5) Then 'If F5 is pressed
StartProgram(TextBox1.Text) 'Starts whats inside textbox1
End If
If GetAsyncKeyState(Keys.F6) Then
StartProgram(TextBox2.Text)
End If
End Sub
MsgBox(GetTime("EVENT", "[]", True, 1)) 'Example of Usage
sendkeys.send("{enter}" & textbox1.text & "{enter}")
it wont let me just do this...
SendKeys.SendWait("{enter}")
Sendkeys.SendWait(TextBox1.Text)
SendKeys.SendWait("{enter}")
Also, the return type is not an Integer either, its a Short. You guys seriously need to look at MSDN or get proper declerations from a website like pinvoke.net:<DllImport("user32.dll")> _
Public Shared Function GetAsyncKeyState(ByVal vKey As System.Windows.Forms.Keys) As Short
End Function
If (GetAsyncKeyState(Keys.F5) And &H1) = &H1 Then