AbbadonDespoiler wrote:
Minesalot wrote:
I did have an issue with finding the Top module rack button. so I could anchor and find if modules were on. I ended up puting it into photoshop and blacking out ALL of the non 255 255 255 white dots. Then telling it exactly what small band to look for, since it will always be at the same height rang y - y+50. but the X can change. I then added *trans0x000000 so it will only look for that exact patern of white dots. It seems to work just fine.
That's a great way to deal with the transparent buttons. I've always opted to just find something opaque nearby. In the case of the Modules, I just used an identifiable, unique piece of the HUD. I will definitely try your way though for another project I'm working on that has a lot of transparent buttons... 
I think a great challenge would be determining how to consistently detect whether or not a module is on that does not have a cycle time (specifically Cloaking Devices). I was thinking of sampling the ring for the green color as quickly as possible for a couple seconds, in the hopes that it gets at least one sample that works. Do you have any thoughts on this?
A note on this. I put the module search code inside a function inside a separate .ahk and included that file in the original script. I have found that sometimes it works, sometimes it does not, sometimes it breaks, sometimes it spits out error, sometimes it works.
I have now taken almost all of my functions out of the function.ahk and put the good old long code back into the original and everything seems to be working much better, still not 100% but worth noting, I am not using the function #include thing any more.
Like the search for overview part. If it is called directly it works 100% of the time. If I call it in a function ie OGFindOverview() then in the function.ahk the function has the exact same code, it may find it, but it most likely will NOT find it. No clue why. But I was overcomplicating things, so now I am in the process of uncomplicating by putting the code back inside each script. With the exception of simple key press stuff. Like OGDockDrones() and all the function does is CTR+D then release CTRL+d. Which is 6 lines of code byw. So in the DroneControl.ahk I use dock drones like 6 times, so that would shorten the over all code by at least 30 lines. smaller is better, but functional is best.