removeProgressBar

void log.removeProgressBar ( ProgressBar progressBar ) (enterprise edition only)
void log.removeProgressBarIfNotStopped ( ProgressBar progressBar ) (enterprise edition only)

Description

Removes the specified progress bar. The removeProgressBarIfNotStopped version removes the progress bar if the scrape has not been stopped, which is useful for determining when a scrape was stopped.

Parameters

  • progressBar The ProgressBar to remove

Return Value

This method returns void.

Change Log

Version Description
5.5.29a Available in all editions.
5.5.31a Available in enterprise edition.
5.5.43a Moved from session to log class.

Examples

Track the progress of a search over the alphabet

 import com.screenscraper.util.ProgressBar;

 ProgressBar bar = log.addProgressBar("Letter", 26);
 for(char c = 'a'; c <= 'z'; c++)
 {
   log.setVariable("SEARCH_LETTER", c);
   session.scrapeFile("Search");
   bar.add(1);

   // For Professional and Enterprise Editions
   log.webInfo("Completed Search on: " + c);

   // For Basic Edition ** Note that this method is available in Professional and Enterprise editions also
   log.logMonitoredValues();
 }

 // Now that we have completed the search, remove the progress bar
 log.removeProgressBar(bar);