basically here is my issue. I run a football team and i pay o2 for online texts each month so i can send weekly texts to are team to let them know this weeks game details.
Right i do this by sendkeys, which is not a issue. But the issue is i want it to be able to only send a sertain number of times. at the moment it goes on indef. which is never good.
I'l just point out im a complete beginer with vb.net, and only code for fun. It only takes me ten minutes to send the messages manually but i wanted to do it just for fun.
2 of the text boxes, txtN.text = number of times to send & txtH.text is the hidden text box that stores the varible. i dont know how else i could use a varible out of the sub? like i said im a beginner im sure there are better ways.
this is what happens when send is clicked, i loop through the whole thing on timers :/
this timers interval is 8 seconds to avoid flooding(as are both timers)
yes im sure some of you are laughing at my code. this is probably such a poor way to do it. im only doing it to learn and i enjoy it.
the error i get is something like i cant use a varible as a interger and a string?
i only written this off of the top of my head, at a different pc but wanted to get the ball rolling with some help.
any advice very much welcome,
thanks
Right i do this by sendkeys, which is not a issue. But the issue is i want it to be able to only send a sertain number of times. at the moment it goes on indef. which is never good.
I'l just point out im a complete beginer with vb.net, and only code for fun. It only takes me ten minutes to send the messages manually but i wanted to do it just for fun.
2 of the text boxes, txtN.text = number of times to send & txtH.text is the hidden text box that stores the varible. i dont know how else i could use a varible out of the sub? like i said im a beginner im sure there are better ways.
this is what happens when send is clicked, i loop through the whole thing on timers :/
this timers interval is 8 seconds to avoid flooding(as are both timers)
Code:
Private Sub Timer2_Tick_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
dim x,n
x = txtN.text
n = 1
txtH.txt = n
if n < x then
n = n +1
'send keys commands are here
Timer2.Enabled = False
Timer3.Enabled = True
txtH.txt = n
else
timer2.enabled = false
timer3.enabled = false
end if
End Sub
Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick
Dim ID
ID = txtID.Text
Dim web As System.Uri = New System.Uri("urlhere" & ID)
Me.WebBrowser1.Navigate(web)
Timer3.Enabled = False
Timer2.Enabled = True
End Sub
yes im sure some of you are laughing at my code. this is probably such a poor way to do it. im only doing it to learn and i enjoy it.
the error i get is something like i cant use a varible as a interger and a string?
i only written this off of the top of my head, at a different pc but wanted to get the ball rolling with some help.
any advice very much welcome,
thanks