{ "name": "Check for focused window every second", "language": 0, "code": "using System;\r\nusing System.Drawing;\r\n\r\npublic static class DisplayFusionFunction\r\n{\r\n\tpublic static void Run(IntPtr windowHandle)\r\n\t{\r\n\t\twhile(true);\r\n\t\t{\r\n\t\t\t// Get the focused window\r\n\t\t\tIntPtr window = BFS.Window.GetFocusedWindow();\r\n\t\t\t\r\n\t\t\t// Check if it contains the text you're looking for and do stuff if it does\r\n\t\t\t// The text here is case sensitive\r\n\t\t\tif (BFS.Window.GetText(window).Contains(\"Video Games\"))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Do stuff here e.g. BFS.DisplayFusion.RunFunction(\"Move Window to Next Monitor\");\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t// Sets the time in milliseconds to wait before checking again\r\n\t\t\tBFS.General.ThreadWait(1000);\r\n\t\t}\r\n\t}\r\n}", "description": "This script will check the focused window and see if it matches the window text on Line 16 every second", "references": "Microsoft.VisualBasic.Core.dll|Microsoft.Win32.Primitives.dll|Microsoft.Win32.Registry.dll|netstandard.dll|Newtonsoft.Json.dll|System.Collections.Concurrent.dll|System.Collections.dll|System.Collections.Immutable.dll|System.Collections.NonGeneric.dll|System.Collections.Specialized.dll|System.ComponentModel.Primitives.dll|System.ComponentModel.TypeConverter.dll|System.Console.dll|System.Core.dll|System.Data.dll|System.Diagnostics.Process.dll|System.dll|System.Drawing.Common.dll|System.Drawing.dll|System.Drawing.Primitives.dll|System.IO.Compression.dll|System.IO.dll|System.IO.FileSystem.Watcher.dll|System.Linq.dll|System.Linq.Expressions.dll|System.Linq.Parallel.dll|System.Linq.Queryable.dll|System.Management.dll|System.Net.dll|System.Net.Primitives.dll|System.Net.Requests.dll|System.Net.WebClient.dll|System.Net.WebHeaderCollection.dll|System.Private.CoreLib.dll|System.Private.Uri.dll|System.Private.Xml.dll|System.Runtime.dll|System.Runtime.InteropServices.dll|System.Runtime.Serialization.Formatters.dll|System.Security.Cryptography.Algorithms.dll|System.Security.Cryptography.Csp.dll|System.Security.Cryptography.Primitives.dll|System.Text.Json.dll|System.Text.RegularExpressions.dll|System.Threading.dll|System.Threading.Tasks.dll|System.Threading.Tasks.Parallel.dll|System.Web.dll|System.Web.HttpUtility.dll|System.Windows.Forms.dll|System.Windows.Forms.Primitives.dll|System.Xml.dll" }