Here is how to reproduce the problem:
1) Unzip the attached zip file.
2) Open a dos prompt and cd into the FinalBuilderServerBusyIssue directory
3) Register the executable:
debug\FinalBuilderServerBusyIssue.exe /regserver
4) Run the vbscript version:
cscript test.vbs
You will get an output similar to:
C:\temp\FinalBuilderServerBusyIssue>cscript test.vbs
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
Starting C:\temp\FinalBuilderServerBusyIssue\\debug\FinalBuilderServerBusyIssue.exe
Waiting for application (GetObject)...
Waiting for application (GetObject)...
Connected to the application
Accessing property A
At this point you have 20 seconds to press the OK button in the message box that is being displayed by the test application:
As soon as you press the OK button the script displays:
ABCDEF
Quit
C:\temp\FinalBuilderServerBusyIssue>
And the application exits with no error.
5) Now run the FinalBuilder script test.fbz5 from the same directory. This script fails with the attached error message:
Basically it seems that the [Another action] action has started before the [Connect to process] action finished. Line 10 in the OnExecute script on the [Connect to process] action should have blocked until the OK button was pressed.
Let me know if you need anything else.
Thanks!
Hi Stephen,
Thanks for your post. I'm able to reproduce this issue here, but I have no theories on why it's not working in FinalBuilder.
It seems like the call to GetObject() is failing to begin with, and this error is being masked by On Error Resume Next. It's returning a value other than Nothing, but it doesnt' seem to be a valid object instance either.
The catch is that all of this happens internally to vbscript.dll - there's nothing we can do to modify it, and - in theory- it should work exactly the same as in cscript.exe.
It's possible this has something to do with message pumping, although - again- I'm unsure what. I'll have more of a look later and let you know how I go.
Regards,
Angus