 {
 	__New(WS_URL)
 	{
+		this.connected := false ; flag for connection status
 		static wb
 		
 		; Create an IE instance

	
	cmd := "#"+toHexColor(red,green,blue) ; # is the set main color command
	; MsgBox %cmd%
	TrayTip, , Blue: %blue%
	sendCmd(cmd)

	return

sendCmd(cmd)
{
	global connected
	global socket
	; MsgBox %connected%
	if( connected )
	{
		socket.Send(cmd)
		; MsgBox %cmd%
	}
	else
		TrayTip, , Not connected to server!
}

toHexColor(r, g, b)

	
	cmd := "#"+toHexColor(red,green,blue) ; # is the set main color command
	; MsgBox %cmd%
	setNotification("Green: " + green)
	sendCmd(cmd)

	return
