I have seriously been programming in C# for less than a month. Moved from PHP and have been moving along really well. I'm doing my first program for wow which reads the chat memory.
I had a little trouble with figuring out where, in the 60 messages that wow holds in memory, to start looking for change when new chat is stored in the memory. What I did was have my program /say a random 4 digit string and then start reading the chat memory starting at the first log and then moving up until I get to the 4 digit string that was input. One problem with that is if someone chats before my program has a chance to find that 4 digit string then it doesn't set the multiplier correctly.
My main problem, and the reason I'm typing this is... I can't keep up with what multiplier it's on. If not much is being said in chat then all is good but if I step into trade chat then I lose the correct multiplier. I even juiced up my CPU usage an extra 50% by using a timer in C# that checks the next chat log for a change every 20 milliseconds. Am I going about this all wrong? What direction should I take because a program of this magnitude shouldn't use more than 10% processor power.