 	
 	OnClose(Event)
 	{
-		TrayTip, , Websocket Closed
-		global connected := 0
+		setNotification("Websocket Closed!")
+		; MsgBox closed!
+		this.connected := 0
 		this.Disconnect()
 		ExitApp
 	}
 	
 	OnError(Event)
 	{
-		TrayTip, , Websocket Error
-		global connected := 0
+		setNotification("Websocket Error")
+		; MsgBox error!
+		this.connected := 0
 		this.Close()
 	}
 	
 	__Delete()
 	{
-		TrayTip, , Exiting
+		; setNotification(" Exiting Led controller ") ; sticks after program closes
 		ExitApp
 	}
 }

		}
	}
}

	if(speed < 0)
		speed := 0
	cmd = ?%speed% ;  ? is the set brightness mode command
	setNotification("Speed: "+ speed)
	sendCmd(cmd)
	; MsgBox %cmd%
	return
