I (more or less) recently figured out a way to bind a series of things to a button. The trick is to use quotation marks.
Say you were testing something on your server and every time you spawn, you want to teleport to a certain location, give yourself 999 armor and 1 health.
Here's an example: (type these in the console)
bind o "setviewpos 892 -1486 28 90; give armor 999; give health 1;"
Without quotation marks, only the first command would be executed.
For taking screenshots, for example, using wait commands may be necessary to make it happen in the correct frame.
bind n "cg_draw2d 0; cg_shadows 3; wait 5; screenshot; cg_draw2d 1; cg_shadows 1;"