quote:
Originally posted by SpunkyLoveMuff
I have managed to fix this now. It's because the ChatWnd.SendMessage function was sending the data back to OnEvent_ChatWndSendMessage and then the code would loop again, but return ""...
I see... though the ChatWnd.SendMessage function doesn't send anything
back. It sends data to the chatwindow, probably triggering another OnEvent_ChatWndSendMessage, and that is what
looped.
1) OnEvent_ChatWndSendMessage is triggered (A)
2) you perform somewhere in that function an ChatWnd.SendMessage
3) Another OnEvent_ChatWndSendMessage is triggered (B)
4) OnEvent_ChatWndSendMessage (B) is ended and returns
5) OnEvent_ChatWndSendMessage (A) is ended and returns
As you see OnEvent_ChatWndSendMessage (A) isn't finished until all the code/statements which are performed in that function are executed, only then it will finish.
or:
1) OnEvent_ChatWndSendMessage is triggered (A)
2) you perform somewhere in that function an ChatWnd.SendMessage
3) OnEvent_ChatWndSendMessage (A) is ended and returns
4) Another OnEvent_ChatWndSendMessage is triggered (B)
5) OnEvent_ChatWndSendMessage (B) is ended and returns
Again, no function or event will finish when all statements inside that function are finished.