Forum Discussion
joffre
14 years agoRegular Contributor
I see in your code that you have a USEUNIT that is referencing a unit called ExecutarScripts. But then you're also calling a subroutine called ExecutarScripts. As a general rule of thumb, it's a bad idea to name functions the same name as the unit name. If you need to do so, you do need to specify the format UnitName.RoutineName.
While you may not have edited this particular set, it's possible that it's getting "lost" in this area. This is just a guess, mind you, so I can't guarentee this is the answer.
That was a misunderstood. The script name is different of the function's name; I just typed wrong.
Another thing to try: Left click in the routine that you are wanting to run and then right click in the same routine and select "Run Current Routine". I don't expect so, but it might be possible that it thinks that there's some other routine currently selected when it tries to "Run Current Routine".
I've tried that too, sadly it didn't work.
Another thing to check: When you get that "waiting for Form1" message and it fails to find Form1, it most likely logs an error message in your test log. Double-click on that error message line and you'll be taken straight to the line that called that Form1 so you should see where it got called. Also, on that error message, you should see a Call Stack tab in your log. That will show you not only the unit that called that code but the stack trace of the units that called THAT unit and so on so you can trace back to what's getting called.
I've tried to double-click the error message but it didn't take me anywhere, and the Call Stack page is blank. After two attempts to find Form1 my script started to run the right script.
I've attached a screen of my screen (!!).
Take a look at the .zip file too please.