| View previous topic :: View next topic |
| Author |
Message |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Sat Dec 15, 2007 1:34 pm Post subject: need help with code fast plz |
|
|
since no one would post on my other thread incept the one with before i wanted it to do diffrent things | killar456 wrote: | | Code: | Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Sub Command1_Click()
If Combo1.Text = "No" Then
Timer1.Enabled = False
If Combo1.Text - "Yes" Then
Timer1.Enabled = True
If Combo2.Text = "No" Then
Timer2.Enabled = False
If Combo2.Text = "Yes" Then
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Text1_Change()
Timer1.Interval = Val(Text1.Text & "000")
End Sub
Private Sub Text2_Change()
Timer1.Interval = Val(Text2.Text & "000")
End Sub
Private Sub Timer1_Timer()
SendKeys "{Ctrl}"
End Sub
Private Sub Timer2_Timer()
SendKeys "{space}"
End Sub
Private Sub Timer3_Timer()
If GetAsyncKeyState("VbKeyctrl" & "vbkeyS") Then
Timer1.Enabled = False
Timer2.Enabled = False
End If
End Sub
| it says block if without end if, but there is a end if....... help plz |
Last edited by killar456 on Sat Dec 15, 2007 1:55 pm; edited 1 time in total |
|
| Back to top |
|
 |
pimpstonie Advanced Cheater
Reputation: 0
Joined: 27 Sep 2007 Posts: 70
|
Posted: Sat Dec 15, 2007 1:42 pm Post subject: |
|
|
| Code: |
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
End Function
|
Im sure this is the problem.
Is that the whole code in that section it errors?
Edit: I ment End Function.
|
|
| Back to top |
|
 |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Sat Dec 15, 2007 1:56 pm Post subject: |
|
|
| Code: | Private Sub Command1_Click()
If Combo1.Text = "No" Then
Timer1.Enabled = False
End If
If Combo1.Text = "Yes" Then
Timer1.Enabled = True
End If
If Combo2.Text = "No" Then
Timer2.Enabled = False
End If
If Combo2.Text = "Yes" Then
Timer2.Enabled = True
End If
End Sub | no its command1_click(), it says like block if without end if, but it has a end if, is this right? and i got that fixed but now this is being stupid | Code: |
Private Sub Timer1_Timer()
SendKeys "{control}"
End Sub
Private Sub Timer2_Timer()
SendKeys "{space}"
End Sub |
|
|
| Back to top |
|
 |
Hack-Addict Master Cheater
Reputation: 0
Joined: 20 Nov 2007 Posts: 287
|
Posted: Sat Dec 15, 2007 2:00 pm Post subject: |
|
|
I see alot of error's in your code...
| Code: | Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Sub Command1_Click()
If Combo1.Text = "Yes" Then
Combo2.Text = "yes"
If timer1.enabled = false then
Timer1.Enabled = True
If timer2.enabled = false then
Timer2.Enabled = True
Else
If timer1.enabled = true then
Timer1.Enabled = False
If timer2.enabled = true then
Timer2.Enabled = False
End If
End Sub
|
Use that code up there, im not so sure about the combobox, but go ahead and use the code up there for that section... and try putting another end if functions if it says that error, or save the project, and reopen visual basic 6 and the project with it. sometimes it happends to me, like it screwd up, and it wouldent give me the show function for another form
_________________
|
|
| Back to top |
|
 |
killar456 Master Cheater
Reputation: 0
Joined: 30 Mar 2007 Posts: 415
|
Posted: Sat Dec 15, 2007 2:09 pm Post subject: |
|
|
| nvm, im droping project, thanks for the help
|
|
| Back to top |
|
 |
pimpstonie Advanced Cheater
Reputation: 0
Joined: 27 Sep 2007 Posts: 70
|
Posted: Sat Dec 15, 2007 2:19 pm Post subject: |
|
|
| He edited the post and added the whole code.
|
|
| Back to top |
|
 |
AtheistCrusader Grandmaster Cheater
Reputation: 6
Joined: 23 Sep 2006 Posts: 681
|
Posted: Sat Dec 15, 2007 4:27 pm Post subject: |
|
|
Private Sub Command1_Click()
If Combo1.Text = "No" Then
Timer1.Enabled = False
If Combo1.Text - "Yes" Then
Timer1.Enabled = True
If Combo2.Text = "No" Then
Timer2.Enabled = False
If Combo2.Text = "Yes" Then
End If
end if
end if
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
|
|
| Back to top |
|
 |
|