Windows Mouse Movement Overlay
Windows Mouse Movement Overlay
I am just looking to use the windows mouse cursor using BCI2000, please advise.
Re: Windows Mouse Movement Overlay
Hi,
I assume you are using a batch file to start BCI2000, not BCI2000Launcher, and that you are using CursorTask as the application module.
In the batch file you use to start up BCI2000, add a line "WATCH CursorPosX 4001", and add a line "WATCH CursorPosY 4002" after all modules have been started.
Then, you can read the value of CursorPosX from local UDP port 4001, and the value of CursorPosY from local UDP port 4002.
In bci2000/src/contrib/AppConnectorApplications/SimpleExample/SimpleExample.cpp, there is a program that demonstrates how to read from a UDP port in C++.
Setting the cursor position in Windows is done using the SetCursorPos API (https://docs.microsoft.com/en-us/window ... tcursorpos).
Note that in BCI2000, the two CursorPos values range from 0 to 32768 each, so you will need to translate them to screen size first (https://stackoverflow.com/questions/463 ... resolution).
Let me know if you have further questions,
Jürgen
I assume you are using a batch file to start BCI2000, not BCI2000Launcher, and that you are using CursorTask as the application module.
In the batch file you use to start up BCI2000, add a line "WATCH CursorPosX 4001", and add a line "WATCH CursorPosY 4002" after all modules have been started.
Then, you can read the value of CursorPosX from local UDP port 4001, and the value of CursorPosY from local UDP port 4002.
In bci2000/src/contrib/AppConnectorApplications/SimpleExample/SimpleExample.cpp, there is a program that demonstrates how to read from a UDP port in C++.
Setting the cursor position in Windows is done using the SetCursorPos API (https://docs.microsoft.com/en-us/window ... tcursorpos).
Note that in BCI2000, the two CursorPos values range from 0 to 32768 each, so you will need to translate them to screen size first (https://stackoverflow.com/questions/463 ... resolution).
Let me know if you have further questions,
Jürgen
Who is online
Users browsing this forum: No registered users and 4 guests