MarkusTegelane
In this tutorial I will show you how you can use mouse in batch files. This tutorial also has a way of doing noflicker system in batch (basically the replacement for CLS).
Code used for this batch file can be found here: https://pastebin.com/vpDCMNxN
BG.EXE: https://www.dostips.com/forum/viewtopic.php?t=4094 (copy and paste the code at the bottom into a bat file and run it to build bg.exe)
Published: May 29 2017
Filename: mt_mouse.avi
Category: Batch files
resident evil 4 mouse patch
Batch file
.bat
Tutorial
File format
Computer mouse
Mouse
Batch file tricks
batch file tricks
batch file tricks notepad
cool batch file tricks
How
Make
Howto
batch file game tutorial
batch file programming tutorial
batch file programming tutorial full
batch file programming tutorial in hindi
batch file programming tutorial in tamil
batch file tutorial
batch file tutorial for beginners
batch file tutorial windows
batch file tutorials
Great Work! We were also dealing with the same problem. And, Created a simple and portable - easy to use alternative instead coding big. :) We named The Solution as - Button Function (v1.0 & 2.0).<br /> <br /> Still Your method teaches the creating things from scratch. Great video. Keep it up!
Thank you! The tokens in the for command were incorrect, because I made this video with a different version of bg.exe that didn't detect which mouse button you pressed (so the output of "bg.exe mouse" looked something like 21 52, unlike the new version where it is 1 21 52). That is why you might actually get 21x1 as the coordinate in my script, even tough it's supposed to be 52x21.
Hi I want to know how i can automate select/run specific application and once opened need to click on specific place, can you pls help
Thank you! The tokens in the for command were incorrect, because I made this video with a different version of bg.exe that didn't detect which mouse button you pressed (so the output of "bg.exe mouse" looked something like 21 52, unlike the new version where it is 1 21 52). That is why you might actually get 21x1 as the coordinate in my script, even tough it's supposed to be 52x21.
Hi I want to know how i can automate select/run specific application and once opened need to click on specific place, can you pls help
Thank you! The tokens in the for command were incorrect, because I made this video with a different version of bg.exe that didn't detect which mouse button you pressed (so the output of "bg.exe mouse" looked something like 21 52, unlike the new version where it is 1 21 52). That is why you might actually get 21x1 as the coordinate in my script, even tough it's supposed to be 52x21.
Hi I want to know how i can automate select/run specific application and once opened need to click on specific place, can you pls help
Thank you! The tokens in the for command were incorrect, because I made this video with a different version of bg.exe that didn't detect which mouse button you pressed (so the output of "bg.exe mouse" looked something like 21 52, unlike the new version where it is 1 21 52). That is why you might actually get 21x1 as the coordinate in my script, even tough it's supposed to be 52x21.
Hi I want to know how i can automate select/run specific application and once opened need to click on specific place, can you pls help
Thank you! The tokens in the for command were incorrect, because I made this video with a different version of bg.exe that didn't detect which mouse button you pressed (so the output of "bg.exe mouse" looked something like 21 52, unlike the new version where it is 1 21 52). That is why you might actually get 21x1 as the coordinate in my script, even tough it's supposed to be 52x21.
Hi I want to know how i can automate select/run specific application and once opened need to click on specific place, can you pls help
Hi, @markustegelane! I found bugs in this little test program. Since you created this program in 2017, this command line may have changed a bit and it doesn't work well. Test.bat:<br /> <br /> @echo off<br /> setlocal EnableDelayedExpansion<br /> set "tab= "<br /> for /l %%a in (1,1,1000) do set "bck=!bck! "<br /> :screen<br /> echo %tab%%bck% 2>nul&set /p= <nul<br /> echo Click anywhere <br /> for /f "tokens=1- 3" %%a in ('bg.exe mouse') do set down=%%a&set right=%%b&set fol=%%c<br /> if %down% == 1 set down1=Left click<br /> if %down% == 2 set down1=Right click<br /> set key=%down1% %fol%x%right%<br /> cls<br /> echo %key%<br /> goto screen<br /> :anywhere<br /> echo %tab%%bck% 2>nul&set /p= <nul<br /> bg mouse >nul<br /> goto screen<br /> <br /> (I first saw this video in 2019, I just not very interested me the mouse in batch files.)
Thank you! The tokens in the for command were incorrect, because I made this video with a different version of bg.exe that didn't detect which mouse button you pressed (so the output of "bg.exe mouse" looked something like 21 52, unlike the new version where it is 1 21 52). That is why you might actually get 21x1 as the coordinate in my script, even tough it's supposed to be 52x21.
Hi I want to know how i can automate select/run specific application and once opened need to click on specific place, can you pls help