script not running

When I call an extractor pattern from a script, another script that is associated with that called extractor pattern to run after each patterm application, does not run.:(

After having suspicions about the script not being run, I put the following line as the first line in the script:

 session.log( "We are in this script" );

When I ran the scraping session, that above string did not output to the session log.

Is this the expected behaviour for screen-scraper when calling an extractor pattern from a script? It runs the extractor pattern but not any scripts associated to it? I'm not sure that the called extractor pattern itself runs because I do not get any messages about it in the session log (I guess maybe thats because I have its checkbox labeled "this extractor pattern will be invoked manually from a script" checked so then screen-scraper does not monitor when it gets run :? ).

script not running

speedster,

If it seems like I've been avoiding answering this post...well, I have and have not. Been very busy, yes, but your problem (even if you've found a work around) has my brain in knots. I've stopped asking the question, "why would you want to do it this way" since the answer to that can be as complicated and the solution itself.

:idea: :oops: :idea:

...still thinking.

-Scott

script not running

Scott,

I don't think you understand my problem. I have already begun another approach in order to avoid this problem since I did not want to wait more then 24 hours for a response. However I would still like to know the cause of this problem.

The problem again... I have a script (lets call this script script1) that gets run after each pattern application of an extractor pattern. This script calls another extractor pattern like so:

scrapeableFile.extractData( dataRecord.get("CHUNK"), "EP2" );

The called extractor pattern (EP2 in the above case) has a script associated with it (lets call this script script2) to also run after each pattern application.

The problem is when the above line of code executes, extractor pattern EP2 runs but not script2 which is associated with it. I came to this conclusion because I put the following as the first line in script2 is:

session.log( "We are in this script" );

The above string did not output to the session log so I figure the script does not get executed at all.

So my question is, when I call an extractor pattern from script like in the first code snippet agove, is it supposed to run with its associated script(s) or not?

script not running

speedster,

I think your observations are correct. When you check the box to have the extractor pattern be invoked manually from a script that implies that it then will not run in sequence with the others. Why then, you may ask, are you still able to set the sequence for that extractor pattern. Well, that there's a flaw in the usability that we're addressing thanks to your observation.

If you do not check that box you are still able to call the extractor pattern from a script. And it will also run in the sequence that it's set to run. If having it invoked always (under both circumstances) is acceptable then simply uncheck the box. If you need it to be invoked sometimes and not other times then I don't believe there is an elegant solution outside of creating a separate scrapeable file for the time you want to call it manually. If this is the case would you mind telling me more about what you're trying to accomplish and I'll offer up alternate ways to go about it.

Thanks,
Scott