From 005aa3a2847a9b5d0dfb21eb3a465f595d20c861 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Wed, 25 Jul 2012 09:09:20 -0400 Subject: [PATCH] Fix the for loop syntax --- libcvautomation_funcs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libcvautomation_funcs b/libcvautomation_funcs index 4968d57..d2c2bbb 100644 --- a/libcvautomation_funcs +++ b/libcvautomation_funcs @@ -166,7 +166,8 @@ click_i () OLD_TIMEOUT=$TIMEOUT TIMEOUT=1 - for loop in {1..$OLD_TIMEOUT} + #I don't like this syntax, but 'for loop in {1..$OLD_TIMEOUT}' doesn't work + for loop in `seq 1 $OLD_TIMEOUT` do for x in $@ do @@ -188,8 +189,7 @@ click_i () done #We'll get here if we don't find a match - OLD_TIMEOUT=$TIMEOUT - TIMEOUT=1 + TIMEOUT=$OLD_TIMEOUT else eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s 'i${center}mouseclick $x' >> $OUTFILE" CVA_RETURN=$? @@ -352,9 +352,9 @@ hover_i () OLD_TIMEOUT=$TIMEOUT TIMEOUT=1 - for loop in {1..$OLD_TIMEOUT} + #I don't like this syntax, but 'for loop in {1..$OLD_TIMEOUT}' doesn't work + for loop in `seq 1 $OLD_TIMEOUT` do - for x in $@ do waitfor "$x" @@ -373,6 +373,9 @@ hover_i () fi done done + + #We'll get here if we didn't find a match + TIMEOUT=$OLD_TIMEOUT else eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s '${center}mouseimage $x' >> $OUTFILE" CVA_RETURN=$?