//	M550 : ENbNƃ|bvAbvj[
define port = 4;

function main()
{
	_Cls();
	_PrintF("Shift/Ctrl{ENbNŁA|bvAbvj[\܂B\n");
	_PrintF("|bvAbvj[\́AMeLXg̕\~܂B\n");

	_ComCreate	   (port);
	_ComSetOnRxText(port, "OnRxText");
	_ComOpen	   (port, 115200, 8, 0, 1);

	_Stop();

	_ComDelete(port);
}

function _OnRClick(x, y, shift, ctrl)
{
	define	id;
	define	$menu[] = {	"eLXgM",
						"I@"};

	id = _PopupMenu($menu[], x, y);

	if		(id == 0) {					//	eLXgM
		_ComSendText(port, $_StrCat($_DateAndTime(), "\n"));
	}
	else if (id == 1) {					//	I
		_Restart();
	}
}

function  OnRxText($Text)
{
	_PrintF("%s", $Text);
	_PrintF("\n");
}
