Customizing actions in "Tabs"

Hello,

New to this list, looks like a lot of good information.

How would one go about customizing the GUI to perform custom actions? I
can see that I can customize Tabs to add more buttons to the standard
reply, comment, resolve etc. How would I create a customized version of
the reply/correspond action that also sets priority to 1 and sets a
custom field? I’m basically trying to create a button for sev 1 tickets
that can do several actions with one click. I tried adding code into
the button and got an error.

Thanks,

JG