I thought I finally had the code to work, and it did work, till I added a few other lines of code and then it stopped taking the next items from the listbox. It just writes the first one, and keeps repeating it every minute.
The code "danp129" posted in there worked perfect in VB6, but now I have VB2005 Express Edition.
I managed to change the code so it would work a bit, but not much result.
Expand|Select|Wrap|Line Numbers
- Private Sub msgtimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles msgtimer.Tick
- Dim msg As Long
- If msg = msglist.Items.Count - 1 Then msg = -1
- msg = msg + 1
- SendKeys.Send(msglist.Items(msg))
- Wait(100)
- SendKeys.Send("{ENTER}")
- End Sub
I think this is the problem:
msg = msg + 1
Somehow this should loop it after the interval so it will write the other items aswell.
Could someone tell me how it's done ?
Also, does it start with the first item again after it's had the last one ?
Thanks and Regards,
Evolution445