Blender-Python: Select and iterate vertices after each other from left to rigth, top to bottom
Operator solution
Since you're asking specifically to select a vertex:
import bpy

data = bpy.context.view_layer.objects.active.data

bpy.ops.object.mode_set(mode = 'OBJECT')
verts = sorted([(v.co.z, v.co.x, v.index) for v in data.vertices], reverse=True)
bpy.ops.object.mode_set(mode = 'EDIT') 

for z, x, v_index in verts:
    bpy.ops.mesh.select_mode(type=&quot;VERT&quot;)
    bpy.ops.mesh.select_all(action = 'DESELECT')
    bpy.ops.object.mode_set(mode = 'OBJECT')
    data.vertices[v_index].select = True
    # modify manually here, e.g.:
    # data.vertices[v_index].co.y += x
    bpy.ops.object.mode_set(mode = 'EDIT') 
    # use bpy.ops here, e.g.:
    # if x &gt; 0: bpy.ops.mesh.hide()

Bmesh solution
import bpy, bmesh

mesh = bpy.context.edit_object.data
bm = bmesh.from_edit_mesh(mesh)
verts = sorted([(v.co.z, v.co.x, v) for v in bm.verts], reverse=True)
for z, x, v in verts:
    v.co.y = z+x # example
    
bmesh.update_edit_mesh(mesh)

Changing for different planes (views)
I assumed the Back Orthographic view and XZ plane: . For other planes you need to sort differently. Perhaps remove reverse argument and use minus signs to swap the sign of the coordinate inside the tuple used for sorting. So the following line:
verts = sorted([(v.co.z, v.co.x, v) for v in bm.verts], reverse=True)

would become: [for Back Orthographic]
verts = sorted([(-v.co.z, -v.co.x, v) for v in bm.verts])

and for Front Orthographic you would change the sign of x for sorting:
verts = sorted([(-v.co.z, v.co.x, v) for v in bm.verts])

Likewise you may want to turn (v.co.z, v.co.x, v) to (v.co.x, v.co.z, v) if you rotate the camera by 90 degrees or want to iterate by columns instead of rows.
Interactive Testing
Here's a script allowing to test if the order is correct, by pressing Ctrl+Shift+F12
bl_info = {
    &quot;name&quot;: &quot;Vertex iterator&quot;,
    &quot;category&quot;: &quot;Mesh&quot;,
}

import bpy

addon_keymaps = []
current_vertex = 0


class WorkMacro(bpy.types.Operator):
    &quot;&quot;&quot;Work Macro&quot;&quot;&quot;
    bl_idname = &quot;object.work_macro&quot;
    bl_label = &quot;Work Macro&quot;
    bl_options = {&quot;REGISTER&quot;}

    def execute(self, context):    
        global current_vertex    
        data = bpy.context.view_layer.objects.active.data
        bpy.ops.object.mode_set(mode = 'OBJECT')
        verts = sorted([(-v.co.z, -v.co.x, v.index) for v in data.vertices])
        bpy.ops.object.mode_set(mode = 'EDIT')
        z, x, v_index = verts[current_vertex]
        bpy.ops.mesh.select_mode(type=&quot;VERT&quot;)
        bpy.ops.mesh.select_all(action = 'DESELECT')
        bpy.ops.object.mode_set(mode = 'OBJECT')
        data.vertices[v_index].select = True
        bpy.ops.object.mode_set(mode = 'EDIT')
        current_vertex = (current_vertex + 1) % len(verts) 
        return {'FINISHED'}


def register():
    bpy.utils.register_class(WorkMacro)
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='3D View Generic', space_type='VIEW_3D')
    kmi = km.keymap_items.new(WorkMacro.bl_idname, 'F12', 'PRESS', ctrl=True, shift=True)
    addon_keymaps.append(km)
    

def unregister():
    bpy.utils.unregister_class(WorkMacro)
    wm = bpy.context.window_manager
    for km in addon_keymaps:
        wm.keyconfigs.addon.keymaps.remove(km)
    del addon_keymaps[:]


if __name__ == &quot;__main__&quot;:
    register()