setting key equivalent programmatically

i wanted a custom hotkeys feature in my program so i was just wondering how to set key equivs in my script. and is there a way to set the modifier as well?

I think you’d have to use call method with some ObjC.

See also: setKeyEquivalent: of NSButton

i think i can just use

set key equivalent of menu item "blah blah" of menu " blah" to "key"

but i dont know how to set the modifier…

See also: menu item