Tim,
Ah, I see now. I didn't make the connection between 'preupload' and 'only runs when you attempt to upload, i.e. F5'.
OK, I tried it, but it didn't work out quite like I'd hoped. I replaced:
recipe.hooks.postbuild.1.pattern=cmd.exe /c "c:\Program Files (x86)\teraterm\ttpmacro.exe" /v "{build.project_path}\TeensyOTA1.ttl" "{vm.runtime.build.final_output_path}" {serial.port} {build.project_name}
with
recipe.hooks.deploy.preupload.1.pattern=cmd.exe /c "c:\Program Files (x86)\teraterm\ttpmacro.exe" /v "{build.project_path}\TeensyOTA1.ttl" "{vm.runtime.build.final_output_path}" {serial.port} {build.project_name}
Now the command doesn't run on F7 - yay! - but errors out on F5. The error is:
Uploading 'T35_WallE3_V1' to 'Teensy 3.5' using 'COM7'
'c:\Program' is not recognized as an internal or external command,
Error running hook: cmd.exe /c "c:\Program Files (x86)\teraterm\ttpmacro.exe" /v "C:\Users\Frank\Documents\Arduino\T35_WallE3_V1\TeensyOTA1.ttl" "C:\Users\Frank\Documents\Arduino\T35_WallE3_V1\Release\" COM7 T35_WallE3_V1.ino
operable program or batch file.
No Teensy boards were found on any USB ports of your computer.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
The upload process has finished.
So, it appears the 'preupload' hook may parse things differently than the 'postbuild' hook?
Thoughts?
Frank
Frank