mirror of
https://github.com/bspeice/libcvautomation
synced 2024-12-04 13:58:11 -05:00
Fix some 'eval' statements not parsing arguments correctly
This commit is contained in:
parent
003a8b9247
commit
86b8c7023e
@ -107,9 +107,9 @@ mouseup ()
|
||||
click ()
|
||||
{
|
||||
if [ -n "$1" ]; then
|
||||
eval $CVAINPUT -s 'mouseclick $1' >> $OUTFILE >> $OUTFILE
|
||||
eval '$CVAINPUT -s "mouseclick $1" >> $OUTFILE >> $OUTFILE'
|
||||
else
|
||||
eval $CVAINPUT -s 'mouseclick 1' >> $OUTFILE >> $OUTFILE
|
||||
eval '$CVAINPUT -s "mouseclick 1" >> $OUTFILE >> $OUTFILE'
|
||||
fi
|
||||
return $?
|
||||
} # ---------- end of function click ----------
|
||||
@ -253,6 +253,17 @@ click_i ()
|
||||
return $RETURN_CODE
|
||||
} # ---------- 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 ----------------------------------------------------------------
|
||||
# NAME: doubleclick
|
||||
@ -431,7 +442,7 @@ hover_xy ()
|
||||
|
||||
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 $?
|
||||
} # ---------- end of function hover_xy ----------
|
||||
@ -633,7 +644,7 @@ key_str ()
|
||||
COMMAND_LINE="-s 'keystring $*' "
|
||||
|
||||
out "key_str: \"$*\""
|
||||
eval $CVAINPUT $COMMAND_LINE >> $OUTFILE
|
||||
eval '$CVAINPUT $COMMAND_LINE >> $OUTFILE'
|
||||
|
||||
return $?
|
||||
} # ---------- end of function key_str ----------
|
||||
|
Loading…
Reference in New Issue
Block a user