diff --git a/applescript/keystrokes.sh b/applescript/keystrokes.sh index 43115611..2969ebfa 100755 --- a/applescript/keystrokes.sh +++ b/applescript/keystrokes.sh @@ -51,7 +51,11 @@ if ! [[ "$num" =~ ^-?[[:digit:]]+$ ]]; then usage "invalid non-integer '$num' given for first argument" fi -if ! [[ "$sleep_secs" =~ ^[[:digit:]]+(\.[[:digit:]]+)?$ ]]; then +if ! is_float "$start_delay"; then + usage "invalid non-float '$START_DELAY' found in environment for \$START_DELAY" +fi + +if ! is_float "$sleep_secs"; then usage "invalid non-float '$SLEEP_SECS' found in environment for \$SLEEP_SECS" fi