diff --git a/dot.script.ps1 b/dot.script.ps1 new file mode 100644 index 0000000..6ce2d2f --- /dev/null +++ b/dot.script.ps1 @@ -0,0 +1,26 @@ +# Erstelle eine .NET-Klasse zur Simulation von Tastatureingaben +Add-Type @" +using System; +using System.Runtime.InteropServices; + +public class Keyboard +{ + [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)] + public static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo); + + private const int KEYEVENTF_KEYUP = 0x0002; + public const int VK_DECIMAL = 0x6E; // VK_DECIMAL ist der virtuelle Tastencode für '.' + + public static void SendKey(byte keyCode) + { + keybd_event(keyCode, 0, 0, 0); // Drückt die Taste + keybd_event(keyCode, 0, KEYEVENTF_KEYUP, 0); // Lässt die Taste los + } +} +"@ + +# Endlosschleife zur Eingabesimulation alle 3 Minuten +while ($true) { + [Keyboard]::SendKey([Keyboard]::VK_DECIMAL) + Start-Sleep -Seconds 180 +}