You're script will need a header and the code SimonT noted, edited to suit your needs. Save the script, it doesn't matter where, when its run or evaluated (ctrl E) the script will be re-create internally within max. Run or evaluate the script once it will show up in the Customize > Customize UI menu. From there you can…
But I have no idea how to bind the script lines to a key or so. I just would like to press a key and the object rotates 90°, press it again and it rotates again around 90°.
I'm really feeling dump at the moment. I can't find a simple shortcut in my max 2010 manuals, nor a little script with a button to rotate a object or selection around 90 degrees. Most times I use the "r" key to rotate with the mouse then but I would like to have a simple shortcut to do the job so I can save the manual…