Code: Select all
color 07 & cls
echo Choose an option:
echo Print
echo Scan
GetInput /M -65536 0 -65540 0 -131072 0 -131078 0 /H
if %errorlevel%==-65537 echo Print selected
if %errorlevel%==-131072 echo Scan selected
pause
Moderator: DosItHelp
Code: Select all
color 07 & cls
echo Choose an option:
echo Print
echo Scan
GetInput /M -65536 0 -65540 0 -131072 0 -131078 0 /H
if %errorlevel%==-65537 echo Print selected
if %errorlevel%==-131072 echo Scan selected
pause
GetInput.txt help file wrote:GetInput [/T msecs] [/I] [{"chars"|keycode}...]
[ /M left top right bottom ... [/H [h1 h2 h3 ...]] ]
/M l t r b ... Coordinates of input selection boxes for mouse clicks.
...
If a list of coordinates for selection boxes is given, the *position* of the
selected box in the list is returned starting at one; ...
...
When no /M switch (list of selection boxes) is given, mouse button click
positions are returned as negative errorlevel values.
...
Screen coordinates start in 0 0 at the left-top corner of the screen.
Code: Select all
@echo off
color 07 & cls
echo Choose an option:
echo Print
echo Scan
rem Print "Print" is in line 1, in columns 0 to 4
rem Scan "Scan" is in line 2, in columns 0 to 3
GetInput /M 0 1 4 1 0 2 3 2 /H
if %errorlevel%==1 echo Print selected
if %errorlevel%==2 echo Scan selected
pause