I found a way to upload automatically (I'm using a Arduino Uno) whenever a *.ino file is opened in the Arduino software on Windows 7.
I'm using a program called AutoHotKey.
The code for the AutoHotKey file is:
Run C:\Sketch\blink.ino
WinWait, Arduino, , 8
Send ^u ;
The 2nd line waits 8 seconds for Arduino to load.
The 3rd line presses "control u" (upload) on the keyboard.
Is there an easier way?
What I am currently doing is using Powershell to open the AutoHotKey file which opens Arduino to auto run my sketch.
Am I able to just us something like:
C:\Sketch\blink.ino%upload
... instead of using AutoHotKey?