Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :: Turns echoing off
- setlocal EnableDelayedExpansion
- :: Allows effect variables with !! (in addition to $$ and %%) and makes for loops usuable
- set "tab= "
- :: Sets varible that will be written on screen to avoid flicker
- for /l %%a in (1,1,1000) do set "bck=!bck!"
- :screen
- :: Sets backspace character that will be used to clear the text on screen
- echo %tab%%bck% 2>nul&set /p=<nul
- echo Click anywhere
- :: Clears screen for the computer, so it can overwrite the text
- for /f "tokens=1- 3" %%a in ('bg.exe mouse') do set down=%%a&set right=%%b
- :: Gets the input from the mouse (position)
- set key=%down%x%right%
- :: Sets the variable named %key% that will have mouse position data
- if "%key%"=="1x1" goto anywhere
- :: Checks the position variable and goes to some label called anywhere
- echo %key%
- goto screen
- :: Goes to the main screen as nothing that goes to conditions was pressed
- :anywhere
- echo %tab%%bck% 2>nul&set /p=<nul
- echo You clicked where I wanted you to click
- bg mouse >nul
- :: Simply executing this command will have some kind of press any key to continue effect, but with mouse
- goto screen
Advertisement
Add Comment
Please, Sign In to add comment