Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Input an ein in der Konsole laufendes Programm senden

Empfohlene Antworten

Veröffentlicht

Hallo,

ich habe in einem VBS via WshShell.Exec eine Konsolenapplikation gestartet. Dort muss der Benutzer mehrfach hintereinander Daten eingeben und Enter drücken. Es geht darum, einer grossen Anzahl importierter PGP-Keys automatisch zu vertrauen.

Das kann man (soweit ich weiss) leider nicht über Argumente beim Aufruf machen, sondern muss immer "trust [ENTER] 4 [ENTER] yes [ENTER] quit [ENTER]" eingeben. Und das für ziemlich viele Keys, was doch sehr nervig ist.

Ich möchte nun genau diese Kommandos an die Konsole schicken und ausführen, um das ganze vollständig zu automatisieren. Das käme dann der Simulation von Benutzereingaben über die Tastatur gleich.

Ist sowas überhaupt möglich?

Viele Grüsse

Jens

Okay, das sieht jetzt blöd aus - aber ich habe die Antwort selbst gefunden. Über die Methode "sendKeys" können einzelne Zeichen an das Fenster gesendet werden:

	

WshShell.SendKeys "t"

WshShell.SendKeys "r"

WshShell.SendKeys "u"

WshShell.SendKeys "s"

WshShell.SendKeys "t"

WSHShell.Sendkeys "{ENTER}"

WshShell.SendKeys "5"

WSHShell.Sendkeys "{ENTER}"

WshShell.SendKeys "y"

WshShell.SendKeys "e"

WshShell.SendKeys "s"

WSHShell.Sendkeys "{ENTER}"

WshShell.SendKeys "q"

WshShell.SendKeys "u"

WshShell.SendKeys "i"

WshShell.SendKeys "t"

WSHShell.Sendkeys "{ENTER}"

Vielleicht braucht das ja mal jemand :floet:

Grüsse

Jens

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.