Skip to content

Instantly share code, notes, and snippets.

@maz-1
Created June 30, 2018 14:39
Show Gist options
  • Save maz-1/2242c4d7d30782562d6012f213fc6a55 to your computer and use it in GitHub Desktop.
Save maz-1/2242c4d7d30782562d6012f213fc6a55 to your computer and use it in GitHub Desktop.
Open arduino projects with per-project settings.
#NoEnv
#NoTrayIcon
SetWorkingDir %A_ScriptDir%
SetRegView 32
SetBatchLines -1
RegRead, ArduinoUninstall, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Arduino, UninstallString
ArduinoEXE := StrReplace(ArduinoUninstall, "uninstall.exe" , "arduino.exe")
SplitPath, A_ScriptDir, OutDirName
if !FileExist(OutDirName . ".ino")
{
count := 0
Loop, *.ino, 1, 1
count += 1
if (count = 1)
FileMove, *.ino, %OutDirName%.ino
else
Exitapp
}
Run, %ArduinoEXE% --preferences-file preferences.txt %OutDirName%.ino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment