Wikipedia:AutoHotkey

A page for tips, and sharing macros, for Wikipedians who edit using AutoHotkey (AHK), a free, open-source custom scripting language for Microsoft Windows.

Anyone using AHK for large-scale editing, or article creation, ' comply with the policy at WP:BOTASSIST.'''

Typing aid

 * See http://pigsonthewing.org.uk/using-autohotkey-macros-make-typing-life-easier/

Complex template: Cite episode
Type:  to render:

Keyboards with missing keys or characters needing the AltGr (right-Alt) key
For a keyboard that needs the alternate graving AltGr (right-Alt) key to type the very frequently used characters "[", "]", "{", "}", and that has no key for "~", this script replaces the less used keys "ù", "µ", "ç", "à" with resp. "[", "]", "{", "}", and defines AltGr-s and AltGr-u to enter talk page signature, and an often used "warning template template":

Today's date
In YYYY-MM-DD format

Type  to render the current day's date, in YYYY-MM-DD format.

Apostrophes, curved and Wikipedia-compliant
To use the curved apostrophe generally except when editing Wikipedia (where this is prohibited by MOS:STRAIGHT), one can take advantage of the fact that the page title when editing Wikipedia articles always contains the word "Editing". This doesn't work, though, when editing talk pages using the Replying feature.

With this code in effect, however, some other technique is needed to produce the left single quotation mark, used in America and Canada only for inner quotation marks; see.

BLP talk page headers
For a new BLP article's talk page.

Note use of  for a new line.

Type  to render:

Then complete as necessary.

Underlining in edit summaries
Use of U+0332 COMBINING LOW LINE adds a nice u̲n̲d̲e̲r̲l̲i̲n̲e̲ to the preceding character in an edit summary. It has to be applied character by character (omitting characters with descenders), so sending it via AutoHotkey, e.g. with   followed by , makes inserting it much more practical (as well as more readable in the relevant text-entry box) than inserting &amp;#x332; (or &amp;#818;) throughout the relevant text. One starts at the end of a word to be underlined and presses the hotkey repeatedly until the entire word is underlined.

The approach also adds only one extra character per underlined character, rather than the five or six that would be required using &amp;#818; or &amp;#x332; toward the maximum length of an edit summary. See, for example, the edit summary at the right-hand side of this page, which would have been too long if '&amp;#818;' had been used.

Open Wikipedia watchlist


You must be logged in.

Replace pieces of text in edit area by pressing F4 key
Press F4 in edit area to replace defined strings.

Opening your sandbox and adding n.
This script is when you press D, it adds n to the start of your sandbox page. This is for a 2880 x 1920 at 150% screen. It may only work with Firefox. Change the clicks to where the edit section is and the close button is.

 d:: Run, https://en.wikipedia.org/w/index.php?title=User:User/sandbox&action=edit Sleep, How long it takes to load the website Click 720 515 Send, {n} Send, {tab} Send, {tab} Send, {tab} Send, {tab} Send, {tab} Send, {enter} Sleep, How long it takes to publish changes Click 712 30