Beispiel #1
0
        protected override void Execute(CodeActivityContext context)
        {
            var filename = Filename.Get(context);

            filename = Environment.ExpandEnvironmentVariables(filename);
            Application activeObject = null;
            object      missing      = Type.Missing;
            Document    document     = null;

            try
            {
                activeObject = (Application)Marshal.GetActiveObject("Word.Application");
                foreach (Document current in activeObject.Documents)
                {
                    if (current.FullName == filename)
                    {
                        document = current;
                        break;
                    }
                }
            }
            catch
            {
                activeObject = null;
            }
            finally
            {
                if (activeObject == null)
                {
                    activeObject = (Application)Activator.CreateInstance(Marshal.GetTypeFromCLSID(new Guid("000209FF-0000-0000-C000-000000000046")));
                }
                activeObject.Visible = true;
            }
            object ofilename = filename;

            if (document == null)
            {
                document = activeObject.Documents.Open(ref ofilename, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
            }
            var p     = document.Content.Paragraphs;
            int index = Index.Get(context);

            if (Index.Expression == null)
            {
                var r = document.Range(0, document.Paragraphs.Last.Range.End);
                r.Text = Text.Get(context); //  + "\r";
            }
            else
            {
                if (p.Count < index)
                {
                    throw new Exception("filename only contains " + p.Count + " Paragraphs");
                }
                p[index].Range.Text = Text.Get(context);
            }
        }
Beispiel #2
0
        protected override void Execute(NativeActivityContext context)
        {
            base.Execute(context);
            var cell    = Cell.Get(context);
            var value   = Value.Get(context);
            var formula = Formula.Get(context);

            Microsoft.Office.Interop.Excel.Range range = worksheet.get_Range(cell);
            if (!string.IsNullOrEmpty(formula))
            {
                range.Formula = formula;
            }
            else
            {
                range.Value2 = value;
            }
            //cleanup();
            var sheetPassword = SheetPassword.Get(context);

            if (string.IsNullOrEmpty(sheetPassword))
            {
                sheetPassword = null;
            }
            if (!string.IsNullOrEmpty(sheetPassword) && worksheet != null)
            {
                worksheet.Protect(sheetPassword);
            }
        }
        protected override void Execute(NativeActivityContext context)
        {
            var GAME = BookmarkName.Get(context);

            //Create a bookmark and wait for it to be resumed.
            context.CreateBookmark(GAME, new BookmarkCallback(OnResumeBookmark));
        }
Beispiel #4
0
        protected async override Task <object> ExecuteAsync(AsyncCodeActivityContext context)
        {
            var files = Files.Get <string[]>(context);
            var t     = new OpenRPA.Workitem();

            t.wiqid       = wiqid.Get <string>(context);
            t.wiq         = wiq.Get <string>(context);
            t.name        = Name.Get <string>(context);
            t.priority    = Priority.Get <int>(context);
            t.nextrun     = NextRun.Get <DateTime?>(context);
            t.success_wiq = Success_wiq.Get <string>(context);
            t.failed_wiq  = Failed_wiq.Get <string>(context);
            if (t.payload == null)
            {
                t.payload = new Dictionary <string, object>();
            }
            foreach (var item in Payload)
            {
                t.payload.Add(item.Key, item.Value.Get(context));
            }
            Workitem result = null;

            if (string.IsNullOrEmpty(Config.local.wsurl))
            {
                await t.Save(false);
            }
            else
            {
                result = await global.webSocketClient.AddWorkitem <Workitem>(t, files);
            }
            return(result);
        }
Beispiel #5
0
        protected async override Task <object> ExecuteAsync(AsyncCodeActivityContext context)
        {
            var folder = Folder.Get(context);

            if (!string.IsNullOrEmpty(folder))
            {
                folder = Environment.ExpandEnvironmentVariables(folder);
            }
            if (string.IsNullOrEmpty(folder))
            {
                folder = Interfaces.Extensions.ProjectsDirectory;
            }
            var _wiq   = wiq.Get(context);
            var _wiqid = wiqid.Get(context);
            await RobotInstance.instance.WaitForSignedIn(TimeSpan.FromSeconds(10));

            var result = await global.webSocketClient.PopWorkitem <Workitem>(_wiq, _wiqid);

            if (result != null)
            {
                foreach (var file in result.files)
                {
                    await global.webSocketClient.DownloadFileAndSave(null, file._id, folder, false, false);
                }
            }
            return(result);
        }
Beispiel #6
0
        protected override void Execute(NativeActivityContext context)
        {
            var url     = Url.Get(context);
            var browser = Browser.GetBrowser(url);
            var timeout = TimeSpan.FromSeconds(3);
            var doc     = browser.Document;

            if (!string.IsNullOrEmpty(url))
            {
                if (doc.url != url)
                {
                    doc.url = url;
                }
            }
            if (FocusBrowser.Get(context))
            {
                browser.Show();
            }
            var sw = new Stopwatch();

            sw.Start();
            while (sw.Elapsed < timeout && doc.readyState != "complete" && doc.readyState != "interactive")
            {
                Log.Debug("pending complete, readyState: " + doc.readyState);
                System.Threading.Thread.Sleep(100);
            }
        }
Beispiel #7
0
        protected async override Task <object> ExecuteAsync(AsyncCodeActivityContext context)
        {
            var filename     = Filename.Get(context);
            var id           = _id.Get(context);
            var ignoreerrors = IgnoreErrors.Get(context);

            var q = "{\"_id\": \"" + id + "\"}";

            if (!string.IsNullOrEmpty(filename))
            {
                q = "{\"filename\":\"" + filename + "\"}";
            }
            // await global.webSocketClient.DeleteOne("files", q);
            var rows = await global.webSocketClient.Query <JObject>("fs.files", q);

            if (rows.Length == 0)
            {
                if (!ignoreerrors)
                {
                    throw new Exception("File not found");
                }
                return(42);
            }
            foreach (var row in rows)
            {
                var _id = row["_id"].ToString();
                await global.webSocketClient.DeleteOne("fs.files", _id);
            }
            return(42);
        }
Beispiel #8
0
        protected override void Execute(CodeActivityContext context)
        {
            var ignore = IgnoreErrors.Get(context);
            var el     = Element.Get(context);

            try
            {
                if (el == null)
                {
                    throw new ArgumentException("element cannot be null");
                }
                if (el.ProcessId == System.Diagnostics.Process.GetCurrentProcess().Id)
                {
                    return;
                }
                var window = el.RawElement.AsWindow();
                window.Close();
            }
            catch (Exception)
            {
                if (!ignore)
                {
                    throw;
                }
            }
        }
Beispiel #9
0
        public static List <MimeMessage> MailAddresFilter(ImapClient client, string ReadType, CodeActivityContext context, InArgument <string> FilterText, bool MarkAsRead)
        {
            List <MimeMessage> MessageList = new List <MimeMessage>();
            IList <UniqueId>   uids        = client.Inbox.Search(SearchQuery.All);

            if (ReadType == "UnRead")
            {
                uids = client.Inbox.Search(SearchQuery.And(SearchQuery.NotSeen, SearchQuery.FromContains(FilterText.Get(context).ToString())));
                if (MarkAsRead)
                {
                    client.Inbox.AddFlags(uids, MessageFlags.Seen, true);
                }
                return(MessageList = uids.AsEnumerable().Select(x => client.Inbox.GetMessage(x)).ToList());
            }
            else if (ReadType == "Read")
            {
                uids = client.Inbox.Search(SearchQuery.And(SearchQuery.Seen, SearchQuery.FromContains(FilterText.Get(context).ToString())));
                if (MarkAsRead)
                {
                    client.Inbox.AddFlags(uids, MessageFlags.Seen, true);
                }
                return(MessageList = uids.AsEnumerable().Select(x => client.Inbox.GetMessage(x)).ToList());
            }
            else
            {
                uids = client.Inbox.Search(SearchQuery.FromContains(FilterText.Get(context).ToString()));
                if (MarkAsRead)
                {
                    client.Inbox.AddFlags(uids, MessageFlags.Seen, true);
                }
                return(MessageList = uids.AsEnumerable().Select(x => client.Inbox.GetMessage(x)).ToList());
            }
        }
Beispiel #10
0
        protected override void Execute(CodeActivityContext context)
        {
            var        vars       = context.DataContext.GetProperties();
            Connection connection = null;

            foreach (dynamic v in vars)
            {
                if (v.DisplayName == "conn")
                {
                    connection = v.GetValue(context.DataContext);
                }
            }
            var query          = Query.Get(context);
            var strcommandtype = CommandType.Get(context);

            System.Data.CommandType commandtype = System.Data.CommandType.Text;
            if (!string.IsNullOrEmpty(strcommandtype) && strcommandtype.ToLower() == "storedprocedure")
            {
                commandtype = System.Data.CommandType.StoredProcedure;
            }
            if (!string.IsNullOrEmpty(strcommandtype) && strcommandtype.ToLower() == "tabledirect")
            {
                commandtype = System.Data.CommandType.TableDirect;
            }
            var result = connection.ExecuteQuery(query, commandtype);

            DataTable.Set(context, result);
        }
Beispiel #11
0
        protected override void Execute(NativeActivityContext context)
        {
            base.Execute(context);
            var           name       = Name.Get(context);
            var           parameters = Parameters.Get(context);
            object        result     = null;
            List <object> _params;

            if (parameters != null)
            {
                _params = parameters.ToList();
            }
            else
            {
                _params = new List <object>();
            }

            var filename = System.IO.Path.GetFileName(workbook.FullName);

            _params.Insert(0, filename + "!" + name);
            result = (TResult)RunMacro(officewrap.application, _params.ToArray());
            if (result != null)
            {
                context.SetValue(Result, (TResult)result);
            }
        }
Beispiel #12
0
        protected override void Execute(CodeActivityContext context)
        {
            string text = Text.Get(context);

            System.Drawing.Bitmap image = Image.Get(context);
            try
            {
                System.Threading.Thread staThread = new System.Threading.Thread(() =>
                {
                    if (!string.IsNullOrEmpty(text))
                    {
                        System.Windows.Clipboard.SetDataObject(text, true);
                    }
                    if (image != null)
                    {
                        System.Windows.Clipboard.SetDataObject(image, true);
                    }
                });
                staThread.SetApartmentState(System.Threading.ApartmentState.STA);
                staThread.Start();
                staThread.Join();
            }
            catch (Exception ex)
            {
                if (IgnoreErrors.Get(context))
                {
                    Log.Debug(ex.Message);
                    return;
                }
                throw;
            }
        }
Beispiel #13
0
        protected override void Execute(NativeActivityContext context)
        {
            var url     = Url.Get(context);
            var browser = Browser.Get(context);
            var timeout = TimeSpan.FromSeconds(3);
            var newtab  = NewTab.Get(context);

            if (browser != "chrome" && browser != "ff" && browser != "edge")
            {
                browser = "chrome";
            }
            if (!string.IsNullOrEmpty(url))
            {
                NMHook.enumtabs();
                var tab = NMHook.FindTabByURL(browser, url);
                if (tab != null)
                {
                    if (!tab.highlighted || !tab.selected)
                    {
                        var _tab = NMHook.selecttab(browser, tab.id);
                    }
                }
            }
            NMHook.openurl(browser, url, newtab);
        }
Beispiel #14
0
        protected override void Execute(CodeActivityContext context)
        {
            var voice   = Voice.Get(context);
            var rate    = Rate.Get(context);
            var volume  = Volume.Get(context);
            var doasync = Async.Get(context);
            var text    = Text.Get(context);
            var task    = Task.Run(() =>
            {
                using (var synthesizer = new System.Speech.Synthesis.SpeechSynthesizer())
                {
                    if (!string.IsNullOrEmpty(voice))
                    {
                        synthesizer.SelectVoice(voice);
                    }
                    if (rate >= 1 && rate <= 10)
                    {
                        synthesizer.Rate = rate;
                    }
                    if (volume >= 1 && volume <= 100)
                    {
                        synthesizer.Volume = volume;
                    }
                    synthesizer.SetOutputToDefaultAudioDevice();
                    synthesizer.Speak(text);
                }
            });

            if (!doasync)
            {
                task.Wait();
            }
        }
Beispiel #15
0
        protected override void Execute(NativeActivityContext context)
        {
            var broker = context.GetExtension <IEventBroker>();

            try
            {
                var messageType = MessageType.Get(context);
                var key         = Key.Get <string>(context);

                var agent   = context.GetExtension <IMessageAgent>();
                var message = agent.GetPrototype(messageType);

                //todo some strange init
                var init = message as IMessagePrototype;
                if (init != null)
                {
                    init.Initailize(key);
                }

                var eventAgent = context.GetExtension <IEventAgent>();

                var e = eventAgent.GetEvent(message);
                broker.Publish(e);

                const string name = "Waiting";
                context.CreateBookmark(name, OnResumeBookmark);
            }
            catch (Exception exception)
            {
                broker.Publish(new ExceptionEvent(exception));
            }
        }
Beispiel #16
0
        protected override void Execute(CodeActivityContext context)
        {
            string systemname = SystemName.Get(context);
            string path       = Path.Get(context);
            string actionname = ActionName.Get(context);
            var    parameters = Parameters.Get(context);

            // object[] parameters = Parameters.Get(context);
            //var _params = new List<object>();
            //Dictionary<string, object> arguments = (from argument in Arguments
            //                                        where argument.Value.Direction != ArgumentDirection.Out
            //                                        select argument).ToDictionary((KeyValuePair<string, Argument> argument) => argument.Key, (KeyValuePair<string, Argument> argument) => argument.Value.Get(context));
            //foreach (var a in arguments)
            //{
            //    _params.Add(a.Value);
            //}
            // var data = new SAPInvokeMethod(systemname, path, actionname, _params.ToArray());
            object[] _parameters = null;
            if (!string.IsNullOrEmpty(parameters))
            {
                _parameters = JsonConvert.DeserializeObject <object[]>(parameters);
            }
            var data    = new SAPInvokeMethod(systemname, path, actionname, _parameters);
            var message = new SAPEvent("invokemethod");

            message.Set(data);
            var result = SAPhook.Instance.SendMessage(message, TimeSpan.FromMinutes(10));
        }
Beispiel #17
0
        protected async override Task <object> ExecuteAsync(AsyncCodeActivityContext context)
        {
            var files = Files.Get <string[]>(context);
            var t     = new Workitem();

            t.wiqid       = wiqid.Get <string>(context);
            t.wiq         = wiq.Get <string>(context);
            t.name        = Name.Get <string>(context);
            t.priority    = Priority.Get <int>(context);
            t.nextrun     = NextRun.Get <DateTime?>(context);
            t.success_wiq = Success_wiq.Get <string>(context);
            t.failed_wiq  = Failed_wiq.Get <string>(context);
            if (t.payload == null)
            {
                t.payload = new Dictionary <string, object>();
            }
            foreach (var item in Payload)
            {
                t.payload.Add(item.Key, item.Value.Get(context));
            }
            Workitem result = null;
            await RobotInstance.instance.WaitForSignedIn(TimeSpan.FromSeconds(10));

            result = await global.webSocketClient.AddWorkitem <Workitem>(t, files);

            return(result);
        }
Beispiel #18
0
        protected override void Execute(NativeActivityContext context)
        {
            var url     = Url.Get(context);
            var browser = Browser.Get(context);
            var timeout = TimeSpan.FromSeconds(3);
            var newtab  = NewTab.Get(context);

            if (browser != "chrome" && browser != "ff" && browser != "edge")
            {
                browser = "chrome";
            }
            if (!string.IsNullOrEmpty(url))
            {
                NMHook.enumtabs();
                var tab = NMHook.tabs.Where(x => x.browser == browser && x.url.ToLower().StartsWith(url.ToLower())).FirstOrDefault();
                if (tab != null)
                {
                    if (!tab.highlighted || !tab.selected)
                    {
                        var _tab = NMHook.selecttab(browser, tab.id);
                    }
                }
            }
            NMHook.openurl(browser, url, newtab);
        }
Beispiel #19
0
        public static void RunDynamicWriteLine()
        {
            //Define the input argument for the activity
            var textOut = new InArgument <string>();
            //Create the activity, property, and implementation
            Activity dynamicWorkflow = new DynamicActivity()
            {
                Properties =
                {
                    new DynamicActivityProperty
                    {
                        Name  = "Text",
                        Type  = typeof(InArgument <String>),
                        Value = textOut
                    }
                },
                Implementation = () => new Sequence()
                {
                    Activities =
                    {
                        new WriteLine()
                        {
                            Text = new InArgument <string>(env => textOut.Get(env))
                        }
                    }
                }
            };

            //Execute the activity with a parameter dictionary
            WorkflowInvoker.Invoke(dynamicWorkflow, new Dictionary <string, object> {
                { "Text", "Hello World!" }
            });
        }
        protected override string Execute(CodeActivityContext context)
        {
            try
            {
                int      userId      = UserId.Get <int>(context);
                int      workspaceId = WorkspaceId.Get <int>(context);
                int      fpid        = FPId.Get <int>(context);
                int      subsystemId = SubsystemId.Get <int>(context);
                string   reportName  = ReportName.Get <string>(context);
                string[] paramTypes  = new[] { ParamTypes.Get <string>(context) };
                string[] paramValues = new[] { ParamValues.Get <string>(context) };

                string outputFileName = PrintReport(userId, workspaceId, fpid, subsystemId, reportName, paramTypes, paramValues, out string exceptionStr);

                if (outputFileName == null)
                {
                    return(exceptionStr);
                }

                return(Convert.ToBase64String(File.ReadAllBytes(outputFileName)));
            }
            catch (Exception ex)
            {
                EventLog.WriteEntry("BasePrint.TadbirPrint", ex.Message);
                return("-4");  //ex.Message;
                //throw ex;
            }
        }
        protected override void Execute(NativeActivityContext context)
        {
            context.CreateBookmark("DownloadDetectorPlugin", new BookmarkCallback(OnBookmarkCallback));
            var timeout = Timeout.Get(context);

            if (timeout.TotalMilliseconds > 0)
            {
                wfApp = Plugin.client.WorkflowInstances.Where(x => x.InstanceId == context.WorkflowInstanceId.ToString()).FirstOrDefault();
                if (wfApp == null)
                {
                    throw new Exception("Fail locating current workflow instance, to create timeout activity");
                }
                timer          = new System.Timers.Timer(timeout.TotalMilliseconds);
                timer.Elapsed += (sender, e) =>
                {
                    try
                    {
                        wfApp.ResumeBookmark("DownloadDetectorPlugin", null);
                    }
                    catch (Exception ex)
                    {
                        Log.Error(ex.ToString());
                    }
                };
                timer.Start();
            }
            context.ScheduleAction(Body, null, null);
        }
Beispiel #22
0
        protected async override Task <JObject[]> ExecuteAsync(AsyncCodeActivityContext context)
        {
            var ignoreErrors = IgnoreErrors.Get(context);
            var collection   = Collection.Get(context);
            var querystring  = QueryString.Get(context);
            var projection   = Projection.Get(context);
            var top          = Top.Get(context);
            var skip         = Skip.Get(context);

            if (top < 1)
            {
                top = 100;
            }
            if (skip < 0)
            {
                skip = 0;
            }
            var orderby = Orderby.Get(context);

            if (string.IsNullOrEmpty(collection))
            {
                collection = "entities";
            }
            JObject[] result = null;
            result = await global.webSocketClient.Query <JObject>(collection, querystring, projection, top, skip, orderby);

            System.Windows.Forms.Application.DoEvents();
            return(result);
        }
Beispiel #23
0
        protected override void Execute(CodeActivityContext context)
        {
            string key     = Key.Get(context);
            var    timeout = Timeout.Get(context);

            if (Timeout == null || Timeout.Expression == null)
            {
                timeout = TimeSpan.FromSeconds(3);
            }
            var vars = context.DataContext.GetProperties();

            Interfaces.VT.ITerminalSession session = null;
            foreach (dynamic v in vars)
            {
                var val = v.GetValue(context.DataContext);
                if (val is Interfaces.VT.ITerminalSession _session)
                {
                    session = val;
                }
            }
            if (session == null)
            {
                throw new ArgumentException("Failed locating terminal session");
            }
            if (session.Terminal == null)
            {
                throw new ArgumentException("Terminal Sessoin not initialized");
            }
            if (!session.Terminal.IsConnected)
            {
                throw new ArgumentException("Terminal Sessoin not connected");
            }
            session.Refresh();
            if (WaitForKeyboard.Get(context))
            {
                session.Terminal.WaitForKeyboardUnlocked(timeout);
            }
            System.Windows.Input.Key _key;
            if (Enum.TryParse(key, true, out _key))
            {
                session.Terminal.SendKey(_key);
                if (WaitForKeyboard.Get(context))
                {
                    session.Terminal.WaitForKeyboardUnlocked(timeout);
                }
            }
        }
Beispiel #24
0
        protected override void Execute(NativeActivityContext context)
        {
            var strcodec = Codec.Get(context);
            var folder   = Folder.Get(context);
            var quality  = Quality.Get(context);

            if (string.IsNullOrEmpty(folder))
            {
                folder = Interfaces.Extensions.MyVideos;
            }
            if (!string.IsNullOrEmpty(folder))
            {
                folder = Environment.ExpandEnvironmentVariables(folder);
            }
            if (quality < 10)
            {
                quality = 10;
            }
            if (quality > 100)
            {
                quality = 100;
            }
            SharpAvi.FourCC codec;
            if (strcodec == null)
            {
                strcodec = "motionjpeg";
            }
            switch (strcodec.ToLower())
            {
            case "uncompressed": codec = SharpAvi.KnownFourCCs.Codecs.Uncompressed; break;

            case "motionjpeg": codec = SharpAvi.KnownFourCCs.Codecs.MotionJpeg; break;

            case "microsoftmpeg4v3": codec = SharpAvi.KnownFourCCs.Codecs.MicrosoftMpeg4V3; break;

            case "microsoftmpeg4v2": codec = SharpAvi.KnownFourCCs.Codecs.MicrosoftMpeg4V2; break;

            case "xvid": codec = SharpAvi.KnownFourCCs.Codecs.Xvid; break;

            case "divx": codec = SharpAvi.KnownFourCCs.Codecs.DivX; break;

            case "x264": codec = SharpAvi.KnownFourCCs.Codecs.X264; break;

            default: codec = SharpAvi.KnownFourCCs.Codecs.MotionJpeg; break;
            }
            var p = Plugins.runPlugins.Where(x => x.Name == RunPlugin.PluginName).FirstOrDefault() as RunPlugin;

            if (p == null)
            {
                return;
            }
            var instance = p.client.GetWorkflowInstanceByInstanceId(context.WorkflowInstanceId.ToString());

            if (instance == null)
            {
                return;
            }
            p.startRecording(instance, folder);
        }
Beispiel #25
0
 protected async override Task<int> ExecuteAsync(AsyncCodeActivityContext context)
 {
     var el = Element.Get(context);
     var blocking = Blocking.Get(context);
     var duration = Duration.Get(context);
     await el.Highlight(blocking, System.Drawing.Color.Red, duration);
     return 13;
 }
Beispiel #26
0
 protected override void Execute(NativeActivityContext context)
 {
     Advantech.Myadvantech.Business.QuoteBusinessLogic.SendApproveEmail(QuoteID.Get(context));
     if (IsCreateBookmark.Get(context) == true)
     {
         context.CreateBookmark("Waiting for CM's approval", new BookmarkCallback(this.OnBookmarkCallback));
     }
 }
Beispiel #27
0
 protected override void Execute(NativeActivityContext context)
 {
     if (_body != null)
     {
         context.ScheduleActivity(_body);
     }
     Result.Set(context, _expressionResult.Get(context));
 }
 protected override void Execute(NativeActivityContext context)
 {
     Console.WriteLine("Activity Id: " + Id);
     // Create a Bookmark and wait for it to be resumed.
     context.CreateBookmark("QuestionAnswerBookmark" + Id,
                            new BookmarkCallback(OnResumeBookmark));
     context.GetExtension <QuestionAnswerExtension>().Question(Id, Question.Get(context));
 }
Beispiel #29
0
 protected override void Execute(CodeActivityContext context)
 {
     using (var synthesizer = new System.Speech.Synthesis.SpeechSynthesizer())
     {
         var text = Text.Get(context);
         synthesizer.Speak(text);
     }
 }
Beispiel #30
0
        protected override void Execute(CodeActivityContext context)
        {
            var el = Element.Get(context);

            if (el == null)
            {
                throw new ArgumentException("element cannot be null");
            }
            var doubleclick = false;

            if (DoubleClick != null)
            {
                doubleclick = DoubleClick.Get(context);
            }
            var button       = Button.Get(context);
            var virtualClick = false;

            if (VirtualClick != null)
            {
                virtualClick = VirtualClick.Get(context);
            }
            var animatemouse = false;

            if (AnimateMouse != null)
            {
                animatemouse = AnimateMouse.Get(context);
            }
            var keymodifiers = "";

            if (KeyModifiers != null)
            {
                keymodifiers = KeyModifiers.Get(context);
            }

            var disposes = new List <IDisposable>();
            var keys     = TypeText.GetKeys(keymodifiers);

            foreach (var vk in keys)
            {
                disposes.Add(FlaUI.Core.Input.Keyboard.Pressing(vk));
            }

            var _button = (Input.MouseButton)button;

            el.Click(virtualClick, _button, OffsetX.Get(context), OffsetY.Get(context), doubleclick, animatemouse);
            TimeSpan postwait = TimeSpan.Zero;

            if (PostWait != null)
            {
                postwait = PostWait.Get(context);
            }
            if (postwait != TimeSpan.Zero)
            {
                System.Threading.Thread.Sleep(postwait);
                // FlaUI.Core.Input.Wait.UntilInputIsProcessed();
            }
            disposes.ForEach(x => { x.Dispose(); });
        }