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.

sendkeys und klammern

Empfohlene Antworten

Veröffentlicht

hi

ich habe ein kleines Programm geschrieben das per Sendkeys texte sendet.

nun habe ich aber das Problem das mir Sendkeys keine klammern () schickt!

dann bekomm ich einen Fehler... (Ungültiger Prozeduraufruf oder ungültiges Argument)

kann man also per sendkeys keine klammern schicken? bzw muss ich +{8} schicken?


Private Sub txtEingabe_GotFocus()

    SendKeys "{(}{)}"

End Sub

ja das ist schön und gut, ich möchte aber einen Text versenden den der User selber eingeben kann!

sagen wir mal:

hallo :)

da ist dann das Problem mit der Klammer...

hab jetzt einfach en Replace gemacht, ist halt nur nervig... denn { kann Sendkeys auch nicht verschicken...


Option Explicit


Private Sub txtAusgabe_GotFocus()

    SendKeys make_string(txtEingabe.Text)

End Sub


Private Function make_string(ByVal strEingabe As String) As String

'ACHTUNG die Zeichen "{" und "}" können nicht automatisch ersetzt

'werden, da sie als Steuerungszeichen verwendet werden.

    strEingabe = Replace(strEingabe, "+", "{+}")

    strEingabe = Replace(strEingabe, "^", "{^}")

    strEingabe = Replace(strEingabe, "%", "{%}")

    strEingabe = Replace(strEingabe, "~", "{~}")

    strEingabe = Replace(strEingabe, "(", "{(}")

    strEingabe = Replace(strEingabe, ")", "{)}")

    make_string = strEingabe

End Function

japp danke genauso hab ich das auch :)

scheint dann en sendkeys "bug" zu sein das meine keine klammern schicken kann oder?!

Ist kein Bug, VB kann nur bestimmte Steuerzeichen ((, ), {, }, ~, ...) nicht als Klartext verschicken.

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.