mirror of
https://github.com/bspeice/libcvautomation
synced 2024-12-04 13:58:11 -05:00
Make the "waitfor" command optional
This commit is contained in:
parent
673f302f2d
commit
9685d442d9
@ -159,16 +159,27 @@ click_i ()
|
||||
TOLERANCE_OPTION="-t"
|
||||
fi
|
||||
|
||||
eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD --timeout $TIMEOUT -s 'waitfor $x' >> $OUTFILE"
|
||||
CVA_RETURN=$?
|
||||
if [ -n "$USE_WAIT" ]; then
|
||||
waitfor "$x"
|
||||
CVA_RETURN=$?
|
||||
|
||||
if [ $CVA_RETURN -lt $RETURN_CODE ]; then
|
||||
RETURN_CODE=$CVA_RETURN
|
||||
fi
|
||||
if [ $CVA_RETURN -lt $RETURN_CODE ]; then
|
||||
RETURN_CODE=$CVA_RETURN
|
||||
fi
|
||||
|
||||
if [ $CVA_RETURN -eq 0 ]; then
|
||||
#We found the image, click it
|
||||
if [ $CVA_RETURN -eq 0 ]; then
|
||||
#We found the image, click it
|
||||
eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s 'i${center}mouseclick $x' >> $OUTFILE"
|
||||
else
|
||||
return $RETURN_CODE
|
||||
fi
|
||||
else
|
||||
eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s 'i${center}mouseclick $x' >> $OUTFILE"
|
||||
CVA_RETURN=$?
|
||||
|
||||
if [ $CVA_RETURN -lt $RETURN_CODE ]; then
|
||||
RETURN_CODE=$CVA_RETURN
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
@ -322,16 +333,25 @@ hover_i ()
|
||||
TOLERANCE_OPTION="-t"
|
||||
fi
|
||||
|
||||
eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD --timeout $TIMEOUT -s 'waitfor $x' >> $OUTFILE"
|
||||
CVA_RETURN=$?
|
||||
if [ -n "$USE_WAIT" ]; then
|
||||
eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD --timeout $TIMEOUT -s 'waitfor $x' >> $OUTFILE"
|
||||
CVA_RETURN=$?
|
||||
|
||||
if [ $CVA_RETURN -lt $RETURN_CODE ]; then
|
||||
RETURN_CODE=$CVA_RETURN
|
||||
fi
|
||||
if [ $CVA_RETURN -lt $RETURN_CODE ]; then
|
||||
RETURN_CODE=$CVA_RETURN
|
||||
fi
|
||||
|
||||
if [ $CVA_RETURN -eq 0 ]; then
|
||||
#We found the image, click it
|
||||
if [ $CVA_RETURN -eq 0 ]; then
|
||||
#We found the image, click it
|
||||
eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s '${center}mouseimage $x' >> $OUTFILE"
|
||||
fi
|
||||
else
|
||||
eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s '${center}mouseimage $x' >> $OUTFILE"
|
||||
CVA_RETURN=$?
|
||||
|
||||
if [ $CVA_RETURN -lt $RETURN_CODE ]; then
|
||||
RETURN_CODE=$CVA_RETURN
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user