It is difficult to determine the cause of the problem on the basis of your message. Please create a new project in DelphiScript, then open the Engine Options dialog (select the corresponding item of the Options submenu), select Visualizer and check the Enabled option. Then press the Record button and perform the same actions that you did when recording the VBScript code that you listed. Zip the TestComplete project. Upon doing this, please check the Update on run option of the Visualizer and run the recorded script. If you encounter the same error, please zip the TestComplete project again along with its Results folder. Send both archives to our support team at firstname.lastname@example.org. If you don't come across the problem when running the recorded script, try to compare it with the script created in VBScript and see which differences may lead to the problem. If you cannot spot the problematic lines of your script, please send both scripts to our support team.
You can also learn more about the Visualizer in the 'Auto-Generating Screenshots During Script Recording and Running' help topic and analyze the script written in DelphiScript yourself.
Of course, if you can send us a sample application demonstrating the issue, this will help best.