mirror of
https://github.com/bspeice/libcvautomation
synced 2024-12-04 13:58:11 -05:00
Add the mousedown and mouseup functions to the BASH wrapper.
This commit is contained in:
parent
161eefde7c
commit
63a4783246
@ -63,6 +63,40 @@ err ()
|
||||
# Begin testing macros
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#--- FUNCTION ----------------------------------------------------------------
|
||||
# NAME: mousedown
|
||||
# DESCRIPTION: Push the mouse button down, and leave it there.
|
||||
# PARAMETERS:
|
||||
# RETURNS:
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
mousedown ()
|
||||
{
|
||||
if [ -n "$1" ]; then
|
||||
eval $CVAINPUT -s 'mousedown $1' >> $OUTFILE >> $OUTFILE
|
||||
else
|
||||
eval $CVAINPUT -s 'mousedown 1' >> $OUTFILE >> $OUTFILE
|
||||
fi
|
||||
return $?
|
||||
} # ---------- end of function mousedown ----------
|
||||
|
||||
#--- FUNCTION ----------------------------------------------------------------
|
||||
# NAME: mouseup
|
||||
# DESCRIPTION: Release a mouse button
|
||||
# PARAMETERS:
|
||||
# RETURNS:
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
mouseup ()
|
||||
{
|
||||
if [ -n "$1" ]; then
|
||||
eval $CVAINPUT -s 'mouseup $1' >> $OUTFILE >> $OUTFILE
|
||||
else
|
||||
eval $CVAINPUT -s 'mouseup 1' >> $OUTFILE >> $OUTFILE
|
||||
fi
|
||||
return $?
|
||||
} # ---------- end of function mouseup ----------
|
||||
|
||||
#--- FUNCTION ----------------------------------------------------------------
|
||||
# NAME: click
|
||||
# DESCRIPTION: Click the mouse where it is currently located
|
||||
|
Loading…
Reference in New Issue
Block a user