diff --git a/README.md b/README.md index 0f5bef4..370bec6 100644 --- a/README.md +++ b/README.md @@ -9,4 +9,4 @@ Send keyboard events from touch controllers. * Grip / Trigger support! ## Installation / Basic Use -Download the latest TouchBinder.zip file from [the GitHub](https://github.com/Graicc/TouchBinder/releases/latest). After extracting the files, place your settings.txt file made [here](https://graicc.github.io/TouchBinder/) in the same folder as your executable. After running TouchBinder.exe, you will see a touch controller icon in the system tray. You can right click on the icon to exit the application or reload the settings file. \ No newline at end of file +Download the latest TouchBinder.zip file from [the GitHub](https://github.com/Graicc/TouchBinder/releases/latest). After extracting the files, place your settings.txt file made [here](https://graicc.github.io/TouchBinder/) in the same folder as your executable. After running TouchBinder.exe, you will see a touch controller icon in the system tray. You can also drag and drop script(s) onto the executable to run them. You can right click on the icon to exit the application or reload the settings file. \ No newline at end of file diff --git a/TouchBinder.ahk b/TouchBinder.ahk index 587ee38..9bdaf1e 100644 --- a/TouchBinder.ahk +++ b/TouchBinder.ahk @@ -53,9 +53,24 @@ tRTrigger := 0x00000010 ; Read Settings Load() { - FileRead, file, settings.txt - l := StrSplit(file, "`r`n") global bindings := [] + if (A_Args.Length() > 0) + { + for n, param in A_Args + { + LoadFile(param) + } + } else + { + LoadFile("settings.txt") + } +} + +LoadFile(filePath) +{ + global bindings + FileRead, file, %filePath% + l := StrSplit(file, "`r`n") for i, v in l { if (v = "") diff --git a/docs/index.html b/docs/index.html index 051942c..57d281a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,6 +12,7 @@

Installation

Download the latest TouchBinder.zip file from the GitHub. After extracting the files, place your settings.txt file (made to the right) in the same folder as your executable. After running TouchBinder.exe, you will see a touch controller icon in the system tray. + You can also drag and drop script(s) onto the executable to run them. You can right click on the icon to exit the application or reload the settings file.