mirror of
https://github.com/bspeice/libcvautomation
synced 2025-04-21 00:41:29 -04: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
|
# 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 ----------------------------------------------------------------
|
#--- FUNCTION ----------------------------------------------------------------
|
||||||
# NAME: click
|
# NAME: click
|
||||||
# DESCRIPTION: Click the mouse where it is currently located
|
# DESCRIPTION: Click the mouse where it is currently located
|
||||||
|
Loading…
Reference in New Issue
Block a user