-
Notifications
You must be signed in to change notification settings - Fork 22
Resupply All Error #397
Comments
Could you try adding this line before the rejigger_mouse(kc_window, 50, 750, 0, 100) |
Alright I give up. I've tried to add the line in 4 different ways, but the script always crashes as soons as I launch it. I think I just don't know how to do it properly, mind showing me how? |
I can't test this since I'm away from my primary rig, but it should look like this (whitespace is important): sleep_fast()
while_count += 1
while_count_checker(kc_window, settings, while_count)
rejigger_mouse(kc_window, 50, 750, 0, 100)
check_and_click(global_regions['fleet_flags_main'], pattern_generator(global_regions['fleet_flags_main'], Pattern('resupply_all.png').exact()), expand_areas('fleet_id'))
sleep_fast()
log_success("Done resupplying!") Note that the middle line is the addedline |
You might also need to add the def resupply():
global kc_window, fleet_needs_resupply, settings
log_msg("Lets resupply fleets!") (middle line is modified line) |
Thanks, I've successfully added the lines now, script works. |
Well, it happened again: You can see the mouse near the resources, yet the resupply all again acts as if it was hovering it.
Here is the console log. |
Unfortunately that's more of an issue with the VM environment than with the script, and I have very little control over that. If you're intent on the VM method, the alternative method I could think of is to manually move the mouse to the location, and then trigger a click event. This DOES has its own set of own possible points of failures, however, and wouldn't be a foolproof way to conduct the resupply action. I can come up with a code snippet for you to try but it's pretty late where I am right now so it'll have to wait a day or two. |
Don't worry about it, I'm not in a hurry or anything. |
Could you download the latest |
Sure thing. |
Environment details
Issue
The issue can be seen in the following image :
As you can see, the resupply all button acts as if the mouse is hovering it, yet it isn't. I'm not sure what happens, but sometimes the mouse seems to go too fast.
It happens quite often, but at random. Some days it will happens 2/3 times in a row, and some days not happen at all.
Console log (if applicable)
The text was updated successfully, but these errors were encountered: