File generated via ApplyGUIScript is empty: I use ApplyGUIScript to download content from a grid view via VBScript:

Screen   SAPLSLVC_FULLSCREEN.0500
  ApplyGuiScript   Template="... .vbs"
  Enter

The VBScript generates a file, and when the InputScript is finished I see that it has been generated correctly. But in the InputScript, when I read the file after the next Screen command, I get an empty file or the content from the previous run. What could be the reason?

The next step of the InputScript is processed too early, since the "Enter" of the InputSrcipt and the VBScript run in parallel. To correct this, remove the "Enter" in the InputScript

Screen  SAPLSLVC_FULLSCREEN.0500
ApplyGuiScript  Template="... .vbs"

and press "Enter" at the end of the VBScript using the command

session.findById("wnd[0]/tbar[0]/btn[0]").press

The InputScript will then continue after processing the VBScript, and you can read the generated file.