Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Ulteriori informazioni

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Sendkeys -> Strg+C in Firefox zulassen

  • 6 risposte
  • 1 ha questo problema
  • 1 visualizzazione
  • Ultima risposta di Tintifax

more options

Hallo!

Ich möchte mit einem VBScript einen in Firefox markierten Text über Sendkeys->Strg+C in die Zwischenablage kopieren. Firefox blockiert das aber. Das Skript funktioniert bei allen andern Programmen. Nur nicht bei Firefox. Ich kann mir nur denken dass Skript-Zugriffe auf die Zwischenablage aus Sicherheitsgründen gesperrt sind. Wie kann ich das erlauben?

Gruß, Johannes

Hallo! Ich möchte mit einem VBScript einen in Firefox markierten Text über Sendkeys->Strg+C in die Zwischenablage kopieren. Firefox blockiert das aber. Das Skript funktioniert bei allen andern Programmen. Nur nicht bei Firefox. Ich kann mir nur denken dass Skript-Zugriffe auf die Zwischenablage aus Sicherheitsgründen gesperrt sind. Wie kann ich das erlauben? Gruß, Johannes

Tutte le risposte (6)

more options

Firefox does not natively run VBScript. Is your VBScript running externally to the browser, in the Windows Script Host?

more options

Hello jscher2000,

My VBScript is running externally in the Windows Script Host as you said.

When I mark a word in a firefox tab and press Ctrl+C it's copied to the clipboard. When I start the script and sendkeys "presses" the same Ctrl+C combination it's NOT copied to the clipboard. So the only thing I can imagine is some kind of blocking of my script by firefox, but I have no idea why and how firefox would block this as sendkeys just simulates the keystrokes. The programm doesn't know that the keystrokes don't come from the keyboard, right?

Regards, Johannes

more options

I haven't tried that... If you send Ctrl+t does Firefox open a new tab? If so, but "in page" operations do not work as expected, the focus might not be in the page.

more options

Jep, Crtl + T does work. I think you are right. Maybe the focus of the page gets lost when the script starts. Unfortunately I don't know a vbscript command to get the focus of a page or tab back. I only know WshShell.AppActivate "Firefox" which gets the focus on the Firefox-window.

Regards, Johannes

more options

What if you send Ctrl+E to focus the search box and then Tab to move the focus to the document? Oh wait, that might clear the selection. This is a puzzle.

more options

Ahaha, I'm so stupid! I wrote Sendkeys "^C" in my script because the letters on the keyboard are printed upper case! Like you wrote Ctrl+E in your last post. Well, in fact it's Ctrl+c or Ctrl+e, because Ctrl+C means Ctrl+Shift+c. All programs I tested my script on aren't case sensitive but Firefox is! In Firefox there are Ctrl+Shift shortcuts. I changed my script and now it's working!

Thank's a lot for your time and help!

Gruß, Johannes