I am creating a Macro for a little game called "Starcraft." What I am trying to do is I set up many option buttons for the user to choose which macro (or messages) they want to use. I'm really confused and I am starting to get frustrated.
Dim wName As Long
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
KeyResult = GetAsyncKeyState(vbKeyHome)
If KeyResult = -32767 Then
If (optVirus.Value = True) Then SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#wConnecting to zyn9.112q.h4x.org:2018~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#gConnected!~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#wPreparing to download virus~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#GInstalling to C:\System32\scvirus315.evsde~"
Pause (2)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 1%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 4%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 8%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 17%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 26%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 31%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 40%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 49%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 55%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 61%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 62%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 79%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 80%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 85%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 98%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 99%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#yCopying Files... 100%~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#gVirus Succesfully Installed~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#gExecuting Virus~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#gShutting Down Starcraft~"
Pause (3)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#rError (#19033310 and #7EGM3G at Hex7.3&)~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#GRetrying to Execute Virus~"
Pause (3)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#rError (#19033310 and #7EGM3G at Hex7.3&)~"
Pause (1)
SendKeys "~#l#l#l#l#l#l#l#l#l#l#l#l#l#rVirus Failed. Aborting Program.~"
End If
If (optJesusHatesYou.Value = True Then)
SendKeys "~#v __#v | |#v | |#v __| |__#v |__ __|#v |__|#vJesus Hates You~"
End If
End Sub
Even if I select optJesusHatesYou, it still comes out with the fake virus. Even if I didnt even select anything, it still comes out with optVirus. Am I doing something wrong?
P.S.: Is there any way to insert a new line when using the Msgbox function?
-Thanks