Script/hotkey for flashing

i want to make a script/hotkey when the ide is open it presses shift-upload to burn to bootloader, is this possible?

The classic Arduino IDE does not provide a keyboard shortcut for Tools > Burn Bootloader however, the beta stage Arduino IDE 2.x does provide configurable keyboard shortcuts for everything. If you want to try it out, you can download it from the "Software" page:

By default, Arduino IDE 2.x doesn't have a keyboard shortcut configured for this operation, but you can set any shortcut you like by opening the File > Advanced > Keyboard Shortcuts menu item. The command is arduino-burn-bootloader.