Andy
Andy

Reputation: 11

Help with making first script

I need help with programming a script for GreaseMonkey. All I want it to do is press "CTRL" and "TAB" and then enter a URL into the address bar. Then repeat.

How can I do this? Where do I start? Please help!

Upvotes: 1

Views: 79

Answers (1)

Brock Adams
Brock Adams

Reputation: 93643

I don't think you can actually send CtrlTab to the browser and have it interpreted as a "switch tabs command". That would be a security hole if you could.

But if you want to open a new tab, you can do that easily. Here's a starter script:

// ==UserScript==
// @name            Tab Opener
// @namespace       http://stackoverflow.com/questions/5321507/
// @include         http://stackoverflow.com/*
// ==/UserScript==

GM_openInTab ("http://www.google.com/");

Upvotes: 1

Related Questions