あれからもプログラム知識ゼロなりにいろいろみて試したところ
かなり前スレで上がってたバッチファイルにするやつを
ベース(スレ01 437氏作)にあれこれ弄ってたら一応連動できたよ。

マウスカーソル位置でX軸 位置 Y軸 速さ を調整
 
# 2> nul || echo off && cls
# 2> nul || SET n=[System.Text.Encoding]::GetEncoding(0).GetString(@(0x0d,0x0a))
# 2> nul || SET t=$t=Get-Content -Path '%~0'
# 2> nul || SET eval=Invoke-Expression
# 2> nul || PowerShell -Command %t%;$t=[system.String]::Join(%n%, $t);%eval% $t
# 2> nul || Pause
$t1=5;$i=0;$rt=0;$mileage=0;$port= new-Object System.IO.Ports.SerialPort COM3,19200,None,8,one;$port.Open();
$port.DtrEnable=$true;$port.RtsEnable=$true;$port.Encoding=[System.Text.Encoding]::GetEncoding(28591);
$dummy=[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');
$Width=[System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Width;$base=200;$rotation=[byte]0;$i=0;
$Height=[System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Height;
while($true){
Start-Sleep -m $base;
$v=([System.Windows.Forms.Cursor]::Position.X/$Width)*100;
$v=[int]($v*$v*$v*$v/1000000);
$v2=([System.Windows.Forms.Cursor]::Position.Y/$Height)*100;
$v2=[int]($v2*$v2*$v2*$v2/1000000);
if($i++ -eq 4){$i=0;$rotation=0x80 -bxor [byte]$rotation};
$string=$port.Encoding.GetString(@(0x03,[byte]($rotation -bor $v),[byte]($rotation -bor $v2)));
$port.Write($string);
}