Setting 2 variables to the mouse's x and y position?

Im quite new to mv again so is there any way to set variables to the x and y position of the mouse cursor in the game window?
Use the script section and add the following:
For variable X ->TouchInput.x
For variable Y ->TouchInput.y
Keep in mind that if you want these values to always be accurate you'll need to put the variables in a parallel event.
MV doesn't update that stuff when you just move around the cursor, you need to click.
Here's one thread where someone wrote stuff to do it [edit: without click] (though depending on what you mean with x and y position, you might need something else):

Original thread: https://forums.rpgmakerweb.com/threads/setting-2-variables-to-the-mouses-x-and-y-position.176354/