private void mainButton_Click(object sender, RoutedEventArgs e) { var processes = Process.GetProcessesByName("VRChat"); if (!processes.Any()) { MessageBox.Show("先にVRChatを起動してください。", "エラー", MessageBoxButton.OK, MessageBoxImage.Exclamation); return; } var vrcWindowHandle = processes[0].MainWindowHandle; User32Wrapper.SetForegroundWindow(vrcWindowHandle); var inputs = User32Util.CreateKeyboardInputs( new (DwFlags dwFlags, VirtualKeyCode virtualKeyCode)[]