 }
 
 ; Called when VirtualDesktopGridSwitcher sends us a message
-ReceiveMessage(cmd, value, msg, hwnd) {
+ReceiveMessage(command, value, msg, hwnd) {
     ; All variables are global unless declared to be local
     global
     local num
-    if (cmd = SWITCHED_DESKTOP) {
+    if (command == SWITCHED_DESKTOP) {
         num := value + 1
         ShowOverlay("Desktop " + num, desktopName[value], "../Icons/" . num . ".ico")
     } else {
-        MsgBox, % cmd, % value
+        MsgBox, % command, % value
     }
 }
 

    MsgNum := DllCall("RegisterWindowMessage", Str, "VIRTUALDESKTOPGRIDSWITCHER_COMMAND")

    exeName := "VirtualDesktopGridSwitcher.exe"

    ; Launch VirtualDesktopGridManager if it's not already running.
    DetectHiddenWindows, On
    If !WinExist("ahk_exe " . exeName) {
        Run "../VirtualDesktopGridSwitcher.exe"
    }


        id := a%A_Index%
        WinGetClass, cls, ahk_id %id%
        ; Skip the "GDI+" window
        If(RegExMatch(cls, "^GDI") == 0) {
            return id
        }
    }
