How to update values based on existing properties via Python?
somewhat important note: this way if doing it should work, but its really hacky and might be unstable or interfere with other parts of blender (im using blender 2.80).


  step one


create a new file in C:\Users\--Username--\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons or the eqivalent path in other operating systems,  its important that the file ends with .py copy the code below and paste into the new file.


  step two


open blender and go to Preferences>addons search for test and enable the test addon, save user preferences, open a new file (in blender) or close and reopen blender, if you have a sequence selected and press the left mouse button you should get a message in the console that says "The Script goes here" (open it by going to Window>Toggle System Console).

from bpy.app.handlers import persistent
import bpy


bl_info = {
    "name": "test",
    "author": "Syler",
    "version": (0, 0, 0, 1),
    "description": "test",
    "blender": (2, 80, 0),
    "category": "Object"
}


@persistent
def load_handler(dummy):
    print("Load Handler:", "test")
    bpy.ops.test.modal('INVOKE_DEFAULT')


def script():
    print('The Script goes here')

class TestModal(bpy.types.Operator):
    bl_idname = "test.modal"
    bl_label = "test Modal"
    bl_options = {"REGISTER", "UNDO", "INTERNAL"}

    def modal(self, context, event):
        #note: using context.area.type to check weather the event got called in the video sequencer doesn't work, don't know why.

        if event.type == 'LEFTMOUSE' and event.value == 'RELEASE':
            if context.selected_sequences != []:
                script()

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}


classes = (
    TestModal,
)


def register():

    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

    bpy.app.handlers.load_post.append(load_handler)


def unregister():

    from bpy.utils import unregister_class
    for cls in classes:
        unregister_class(cls)
    bpy.app.handlers.load_post.remove(load_handler)


the way this works is the addon gets registered, then when a file gets loaded it calls the TestModal Class, which checks the input for the left mouse button, when you also have a sequence selected then it calls the script def.