Running Scripts from manually invoked patterns

Hi,

When i invoke a pattern manually (from script) the underlying scripts do not get executed. The pattern itself is executed. To make sure i added the following code to the calling script:

session.logInfo(session.getVariable("CountryName"));
scrapeableFile.extractData( session.getVariable("Countries"), "GetCountries" );
session.logInfo(session.getVariable("CountryName"));

the log reports:

Processing script: "BookingCountries"
null  /* correct, session.CountryName not set yet */
Countries: Extracting data for pattern "GetCountries"
The token "CountryUrl" has no regular expression.
The token "CountryName" has no regular expression.
Zwitserland
Processing script: "Countries"
Zwitserland
Countries: Extracting data for pattern "GetCountries"
The token "CountryUrl" has no regular expression.
The token "CountryName" has no regular expression.
Verenigde Staten
Processing script: "Countries"
Verenigde Staten
Countries: Extracting data for pattern "GetCountries"
The token "CountryUrl" has no regular expression.
The token "CountryName" has no regular expression.
Panama
Processing script: "Countries"
.....

I tried different "When to run" options but none execute. Is this by design or am i doing something wrong?

Kind regards,
Nebu

DataSet countries =

DataSet countries = scrapeableFile.extractData( session.getVariable("Countries"), "GetCountries" );
for (i=0; i<countries.getNumDataRecords(); i++)
{
   dr = countries.getDataRecord(i);
   name = dr.get("CountryName");
   session.log("Country:" + name);
}

While reading the forums i

While reading the forums i came along a similar question with a similar answer. Personally i would prefer if scripts could be set and run through the gui. But this works to ty.