This will reload the ui whenever there is invisible mail on the server and your visible mail count gets down to 1. If there are more messages than 1 it will not be triggered, Use with pb should be ideal since pb is a lot more reliable in properly looting mails and deleting the empty ones than addons like postal. It was about time I got this to work like it is supposed to. Enjoy!
So it will refresh received in-game mails once there is 1 left in mailbox? Awesomesauce Panda hugs to you.
If(MailCount == 1) {Lua.DoString("RunMacroText(\"/reload\")");} Y U NO HUG ME!?! I did it in a single line.
I might not have done it in the smartest way because I used a hundred workarounds while trying to google-learn both lua's and c#'s syntax, but I'm pretty sure the final plugin would contain more than 1 line... I have never learned programming in a structured fashion and never communicated much on it either, but I've learned that the central idea is usually imaginable in a single line. Mind you I'm just talking out of my ass, and I do actually bow down humbly before your skills, however much irony could be read into that sentence.
Every program in the world could be written on a single line. From: public class myClass { public static void main(String[] args) { for(int i = 0; i < 100; i++) { System.out.println(i); } } } To: public class myClass {public static void main(String[] args) {for(int i = 0; i < 100; i++) {System.out.println(i);}}} Same result, a lot smaller, a lot harder to read
Hi, sounds interesting. Can someone explain how to use this? PB with GetMail action or something? I was trying some configuration and nothing. And need or not TSM? Thanks.
i just rewrote this by properly attaching it to mailbox events, but it seems blizz has blocked the reload action somehow. an alternative would be to send keystrokes, but im afraid keypress doesnt always send a single stroke... sendmessage would work fine, but i have no idea how to access the wow process id through hb... any help?
Personally, I'd be using this: PHP: Lua.DoString("CheckInbox()"); And I believe the reason why it sometimes doesn't work, is because this is throttled server side by Blizzard. If you use Postal, then you can see a timer on how long until you can refresh the mailbox when you close it. For example if you have more mails (which has not yet been loaded into mailbox), then when you close the mailbox frame, Postal will write in your chat how long until new mails will appear. I believe this to be a timer of this throttle, since the timers were matching quite good with my own experience of when I could call CheckInbox() I don't know if CheckInbox() and /reload are the same, as I do not know of /reload (what does it do, exactly? - ah, reloadui. And here I've been typing /console reloadui every single time >_>) Anyway - afaik reloading UI will break a few things in PB (I'm not sure), plus it improves the risk of HB crash?
uppd a new version, written from scratch, should be a lot more stable now, but youll have to put a reload macro on button 1.
That's a bummer.. Have you tried PHP: Lua.DoString("ReloadUI()"); ? EDIT: Ah wait, it does require a hardware event :/
itll reload the ui when there arent anymore visible mails @inrego thanks for the advice, that hasnt been working for a while i think, but sendmacrotext never required a hardware event until now, very recently after i upped the first version of this plugin lol... go figure. an alternative that i could easily get to work would be using sendmessages. id like to find away to (directly) get the mainwindowhandle or at least the process id of the respective wow process without having to enumerate all windows or read hb's mainwindowtitle. there should be a variable with the processid stored in it, but i havent been able to figure out what its called lol. wow never tried to detect the sender of sendmessages before and eventhough thats easily done i doubt theyre going to. i could just do sth like: enter, /, r, e, l, o, a, d, enter. not sure if the parameters will change with different regional settings and all, but i dont think so. i usually just spy on the window and copy the parameters.