Jump to content
Macro Express Forums

jimbo

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by jimbo

  1. Thanks Kevin for the idea. I figured out that the error that caused the macro to abort was the GetControlClass function and not the CaptureControlBenaeathMouse function. So I setup a loop to make sure the control was visible (i.e. captured) before I tried the GetControlClass function. That appears to have worked last night as this macro takes an hour or so to run. It would still be nice to have an error trap so you could handle problems more gracefully.

     

    Repeat Until %T22% = "Valid"

    Capture Control to %C8%

    If Control %C8% Visible

    Variable Get Control Class: %C8% to %T18%

    Variable Set String %T22% "Valid"

    End If

    Repeat End

  2. I have a macro that uses the CaptureControlBeneathMouse and GetControlClass functions. Sometimes the functions return an error when the control does not exist. This is probably true as the screen repaints (without any visible trace to the user). The problem that I have is when the error is generated it aborts the macro. Is there anyway to trap an error like this and handle it rather than aborting the macro? Below is a code I am using.

     

    Mouse Left Button Click

    Delay 0.5 Seconds

     

    // Capture Control where mouse was clicked

    Capture Control to %C8%

    Variable Get Control Class: %C8% to %T18%

     

    Thanks,

    jimbo

×
×
  • Create New...