Give this a shot...

 Code:
$nul = SetOption("NoVarsInStrings","On")
$nul = SetOption("NomacrosInStrings ","On")

tryCommand("use c: '\\fileserver\share1'", 3)
tryCommand("use c: '\\fileserver\share1'", 3)
tryCommand("use c: '\\fileserver\share1'", 3)
get $

function tryCommand($command, $howoften, OPTIONAL $interval)
   DIM $i
   DIM $ERROR
   $i = 0

   if $howoften < 1 
      $tryCommand = -1
      return $tryCommand
   endif

   do
      $ = execute($command+" $ERROR = @error")
      ;$ERROR = @error
      ?"Error is: "+$ERROR
      ?"@ERROR is: "+@ERROR
      DIM $foo
      get $foo
      ?

      if $ERROR = 0 
         $tryCommand = $ERROR
         return $tryCommand
      endif

      if $interval <> ""
         sleep $interval
      endif

      $i = $i + 1
   until $i = $howoften

   $tryCommand = $ERROR
   return $tryCommand
endfunction