Think the code might be more efficient this way.
Start Loop
docked with an empty ore hold (remember station to bot variable)
click undock
click Mining tab in overview
right click first asteroid belt and warp to 0
when warp ends scroll down in overview to bring ore asteroids to visible
start sub-loop
right click first ore asteroid and approach
when in range right click same ore asteroid and lock target
click first high slot with mining laser (for reliability wait until ship stopped)
click second high slot with mining laser
wait until ore hold full or asteroid depleted (both mining lasers stopped)
if ore hold full exit sub-loop
otherwise go to beginning of sub-loop
end sub-loop
click General tab in overview
right click originating station and dock (retrieve from bot variable)
click and hold to drag ore from ore hold to item hangar
go to beginning of loop
End Loop