Powershellで 変数に保存したマウスポインタのX,Y座標を別々に取得したい
Add-Type -AssemblyName System.Windows.Forms [System.int16]$x = [System.Windows.Forms.Cursor]::Position.X [System.int16]$y = [System.Windows.Forms.Cursor]::Position.Y function test($xz,$yz){ [System.Windows.Forms.MessageBox]::Show("($xz,$yz)`r`n") } test $x $y
の様に書いていたものを
Add-Type -AssemblyName System.Windows.Forms [System.int16]$xy = [System.Windows.Forms.Cursor]::Position function test($xyz){ [System.Windows.Forms.MessageBox]::Show("($xyz.Position.X,$xyz.Position.Y)`r`n") } test $xy
の様に変更したのですがうまく動きません
x,y座標をまとめて変数の代入した場合はどうやって分けたらいいのでしょうか
教えて下さい。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。