Added waitForAppScript cap

This is a workaround for #4032. Script samples will be collected in #4190.

@jlipps will merge now it and put in a 1.3.4-beta2 release, but can you check.