Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Graicc committed Oct 31, 2019
1 parent 7a18a8d commit 21b0fd3
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions TouchBinder.ahk
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#Singleinstance force
hModule := DllCall("LoadLibrary", "Str", "auto_oculus_touch.dll", "Ptr")

; TODO: remove in final build
;Menu, tray, NoStandard
Menu, tray, NoStandard
Menu, tray, add, Reload, Reload
Menu, tray, Default, Reload
Reload() {
Reload
}
Menu, tray, add, Exit, Exit
Exit() {
ExitApp
}

Menu, tray, add, Save, Save
; Menu, tray, add, Save, Save

Menu, Tray, Icon, icon.png

Expand Down Expand Up @@ -57,34 +60,32 @@ Load()
}
}

Save()
{
global bindings
t := ""
for i, v in bindings
{
a := v[1]
loop % v.MaxIndex() - 1
{
t := t . v[A_Index + 1][1] . "|" . v[A_Index + 1][2]
}
t := t . "," . v[1]
if !(i = bindings.MaxIndex())
{
t := t . "`r`n"
}
}

FileDelete, settings.txt
FileAppend, %t%, settings.txt

Load()
}
; Save()
; {
; global bindings
; t := ""
; for i, v in bindings
; {
; a := v[1]
; loop % v.MaxIndex() - 1
; {
; t := t . v[A_Index + 1][1] . "|" . v[A_Index + 1][2]
; }
; t := t . "," . v[1]
; if !(i = bindings.MaxIndex())
; {
; t := t . "`r`n"
; }
; }

; FileDelete, settings.txt
; FileAppend, %t%, settings.txt

; Load()
; }

Load()

;bindings.Push(["{Left}",["bPressed","bB"]])

Loop {
DllCall("auto_oculus_touch\poll")

Expand Down Expand Up @@ -124,4 +125,3 @@ Loop {

Sleep, 10
}

0 comments on commit 21b0fd3

Please sign in to comment.