From 600a08dd517075b44f59d0940ffda8e8c23ee5db Mon Sep 17 00:00:00 2001 From: JonatanRek Date: Tue, 17 Sep 2024 06:23:17 -0700 Subject: [PATCH] Process Macro Fixes --- FakeDeckUI/FakeDeck/ButtonType/ProcessMacro.cs | 11 +++++++++-- FakeDeckUI/FakeDeck/configuration.yaml | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/FakeDeckUI/FakeDeck/ButtonType/ProcessMacro.cs b/FakeDeckUI/FakeDeck/ButtonType/ProcessMacro.cs index 9f2ba34..0dbc210 100644 --- a/FakeDeckUI/FakeDeck/ButtonType/ProcessMacro.cs +++ b/FakeDeckUI/FakeDeck/ButtonType/ProcessMacro.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; using System.Runtime.CompilerServices; using System.Text; @@ -31,10 +32,16 @@ namespace FakeDeck.ButtonType public static bool invokeAction(string process, string arguments = "") { - if (!System.IO.File.ReadAllText("./configuration.yaml").Contains(process)) + if (!File.ReadAllText("./configuration.yaml").Contains(process)) { Debug.WriteLine("not known process"); - return true; + return false; + } + + if (!File.ReadAllText("./configuration.yaml").Contains(arguments)) + { + Debug.WriteLine("not known arguments"); + return false; } Process notePad = new Process(); diff --git a/FakeDeckUI/FakeDeck/configuration.yaml b/FakeDeckUI/FakeDeck/configuration.yaml index 70aeca4..51dee2b 100644 --- a/FakeDeckUI/FakeDeck/configuration.yaml +++ b/FakeDeckUI/FakeDeck/configuration.yaml @@ -121,6 +121,8 @@ pages: parameters: - name: process value: "cmd.exe" + - name: arguments + value: "/C ping google.com -t" - name: image value: "https://winaero.com/blog/wp-content/uploads/2019/06/WIndows-Terminal-icon.png"