Andreev.org: Фотодневники путешествий

ADLab: Quail Update. Wait For Condition, OpenFileDialog and more…

ADLab: Quail Update. New Quail version now available

This is a minor update, adding a couple often requested features.

Added capability to tell Snapshot activity to wait until conditions satisfied. To do this, set “Wait for Condition” property to “True”, and optionally change Timeout from 0 (infinite) to reasonable number (in seconds).

Added few methods in QuailHelper class to keep and request value from different action and snapshot activities (kind of like global variable). For example, you can add a line to your action activity similar to this:

ADLab.Quail.Engine.QuailHelper.AddValue(“uniquekey”, this.myEditControl.Text)

and a few activities later in Snapshot activity use code similar to the following to compare values:

ADLab.Quail.Engine.QuailHelper.GetStringValue(“uniquekey”) == this.myEditControl.Text

P.S. I have received a number of emails asking how to handle OpenFileDialog and similar functionality.

The simplest way is to use a combination of 2 action activities. First one, for example, is ClickActivity used to perform click on menu or button that display OpenFileDialog.  You will need to change “Wait for Completion” property to false, so the workflow can keep going with dialog popped up. The second activity is regular action activity, with code similar to this:

System.Windows.Forms.SendKeys.SendWait(“C:\\myfile.xml{Enter}”)

For more details and defined macros, see MSDN help on SendKeys class.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “ADLab: Quail Update. Wait For Condition, OpenFileDialog and more…