Forum Discussion

jwalker009's avatar
13 years ago

Runner.CallObjectMethodAsyn causing script error

I am getting an error 'Object doesn't support this property or method: 'Runner.CallObjectMethodAsyn' on the 2nd line below. 

Set form = Aliases.MyApplication.Main

Set Result = Runner.CallObjectMethodAsyn(form, "Close")


Key information:

  1. I am trying to call the Close method Asynchronously because this will open a modal window in my application that I need to deal with.

  2. calling form.Close will attempt to close the form, however a modal window opens causing the script execution to "hang" until I manually close the modal window.

  3. I have also tried using an OnUnexpectedWindow event, however this does not work because of #2.

  4. The WndClass of MyApplication.Main is WindowsForms10.Window.8.app.0.141b42a_r15_ad1