IDE: Save board type and serial port with project

I am developing a home network with different types of arduino (pro mini, uno, micro) and it would be great if the board type and serial port settings could be linked to the project / file in the editor.
(It would save me a lot of mouseclicks...)

I had a slightly different problem and I wrote the Python program in this link which takes care of the verifying and uploading. The Python program uses a few lines of comments at the top of the code to identify the board and the serial port. It may solve your problem.

Because the info for Python is in comments the code will also compile with the Arduino IDE.

My need was to keep track of exactly what program had been uploaded so I could easily go back to it later. If you don't need that you could simplify the Python code.

...R