layout specific actions for custom menus
i am hoping that there is a way to assign a script to the "new record" command that will run a different script depending on what layout the command is launched from (i.e in "contacts" i would like to run my "new contact" script, and for "invoices" i would like to run my "new invoice" script). however, i could only see a way to attach a single script to a custom menu. am i missing something or is this not possible? do i need to make multiple custom menus or menu sets that somehow are linked to the layouts?
i am completely new to working with custom menus so please pardon my ignorance.