I'm a retard.
I'll be changing how DGSweeper works in the next couple days to make it more reliable. However, it'll require more CPU usage.
I'll explain the way it functions currently. Every 250ms it relocates RuneScape and stores the position of the map button and the map. If RuneScape isn't found, it hides all of the DGSweeper windows. When you click it launches a thread which then uses the Windows function, GetCursorPos
, and compares the results with the position of the map button to see if you've clicked the map button.
It'll continue to locate the applet every 250ms. However, it'll use a mouse hook (inb4flaggedbyantiviruses). Each time the mouse is moved, it'll call a callback function which will determine if the mouse is over the map button. This function will constantly be updating a boolean variable which'll contain whether or not the mouse is over the map.
That way, each time the lbutton thread is called, it'll only have to check if _dgs.mouse.overbutton is true before looking for the map.
. This should prevent it from freezing up.Edit:
To make it reliable and remove some of the load, I could just disable to auto-hide when RuneScape isn't active, seeing as how you can hide it with Ctrl-M. Would this be too much of a pain in the ass?