mirror of
https://github.com/bspeice/libcvautomation
synced 2025-01-09 07:20:03 -05:00
Fix some 'eval' statements not parsing arguments correctly
This commit is contained in:
parent
d265940008
commit
3343652be4
@ -73,9 +73,9 @@ err ()
|
|||||||
click ()
|
click ()
|
||||||
{
|
{
|
||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
eval $CVAINPUT -s 'mouseclick $1' >> $OUTFILE >> $OUTFILE
|
eval '$CVAINPUT -s "mouseclick $1" >> $OUTFILE >> $OUTFILE'
|
||||||
else
|
else
|
||||||
eval $CVAINPUT -s 'mouseclick 1' >> $OUTFILE >> $OUTFILE
|
eval '$CVAINPUT -s "mouseclick 1" >> $OUTFILE >> $OUTFILE'
|
||||||
fi
|
fi
|
||||||
return $?
|
return $?
|
||||||
} # ---------- end of function click ----------
|
} # ---------- end of function click ----------
|
||||||
@ -219,6 +219,17 @@ click_i ()
|
|||||||
return $RETURN_CODE
|
return $RETURN_CODE
|
||||||
} # ---------- end of function click_i ----------
|
} # ---------- end of function click_i ----------
|
||||||
|
|
||||||
|
#--- FUNCTION ----------------------------------------------------------------
|
||||||
|
# NAME: rightclick_i
|
||||||
|
# DESCRIPTION: Exactly like click_i, but click the right mouse button
|
||||||
|
# PARAMETERS:
|
||||||
|
# RETURNS:
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
rightclick_i ()
|
||||||
|
{
|
||||||
|
hover_i $@ && click 3
|
||||||
|
} # ---------- end of function rightclick_i ----------
|
||||||
|
|
||||||
#--- FUNCTION ----------------------------------------------------------------
|
#--- FUNCTION ----------------------------------------------------------------
|
||||||
# NAME: doubleclick
|
# NAME: doubleclick
|
||||||
@ -397,7 +408,7 @@ hover_xy ()
|
|||||||
|
|
||||||
out "hover_xy: $X_LOC $Y_LOC"
|
out "hover_xy: $X_LOC $Y_LOC"
|
||||||
|
|
||||||
eval $CVAINPUT -s "mousexy $X_LOC $Y_LOC" >> $OUTFILE
|
eval '$CVAINPUT -s "mousexy $X_LOC $Y_LOC" >> $OUTFILE'
|
||||||
|
|
||||||
return $?
|
return $?
|
||||||
} # ---------- end of function hover_xy ----------
|
} # ---------- end of function hover_xy ----------
|
||||||
@ -570,7 +581,7 @@ key_str ()
|
|||||||
COMMAND_LINE="-s 'keystring $*' "
|
COMMAND_LINE="-s 'keystring $*' "
|
||||||
|
|
||||||
out "key_str: \"$*\""
|
out "key_str: \"$*\""
|
||||||
eval $CVAINPUT $COMMAND_LINE >> $OUTFILE
|
eval '$CVAINPUT $COMMAND_LINE >> $OUTFILE'
|
||||||
|
|
||||||
return $?
|
return $?
|
||||||
} # ---------- end of function key_str ----------
|
} # ---------- end of function key_str ----------
|
||||||
|
Loading…
Reference in New Issue
Block a user