I'm not allowed to edit my post, but here's a better version of the script above that returns the cursor to where it was before running the macro (just in case anyone doesn't want to opt into the beta but can't wait for the patch):
; Pillars of Eternity Change Weapon Set
; by galneon
; AutoHotkey Version: 1.1
; Script Function:
; Quickly change current weapon set for selected character
; Calibrated for 1920 x 1080 Fullscreen with custom ability bar position
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#IfWinActive Pillars of Eternity
; Toggle weapon set
Tab:: ; Activate via Tab (ensure no bind exists for Tab in-game)
MouseGetPos CurX, CurY ; Mark current cursor position
MouseClick, left, 370, 930 ; Location of ability bar weapon set button. Take a screenshot or just guess to find proper coordinates.
Sleep, 60
MouseMove %CurX%, %CurY%, 0 ; Return to previous cursor position
Return