Created By  inflectra.adam Friday, February 20, 2015
There are several ways to find if something is already on the screen, this article explains some of the options.


Use the Global.DoWaitFor(object_id, nnn);

-- This function may be used to wait for some object or to find an object. See Global.DoWaitFor.

So if you have some object (such as text label, button and so on) available for the current dialog you may 'wait' for it for small amount of time. If it is not found the the dialog does not exist. For example:

if(Global.DoWaitFor('Confirm_Label',1000)){ ...}

Second: Use the internal API available through g_util object:

var found = g_util.FindWindows('Error Message', 'regex:.*'); if(found.length==1) { // Actions if the window is found }
Article Info
  • Last Updated: 2/20/2015
  • Article ID: KB135
  • Views: 2970