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

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

New Quail version now available.

This is a minor update adding 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 line to your action activity similar to this:

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

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

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

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

The simplest way is to use 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 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.

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

  1. Нестеров
    February 26, 2008

    Щас заценим ваш тест