The studio I work for is putting out an update on a game that includes a revised manual. We had a copy of the manual that included the old index, but the index and the terms were not bookmarked, so it couldn't be "updated" using the functionality in MS word.
This AHK app was to zip through the list of terms/phrases in the index, point the cursor at a word in the phrase, type the hot key (Winkey + z) and assign the index mark to the phrase, thus enabling the various auto-indexing functions in MS word.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#z::
SendInput {Lbutton 3}
Send !+x
Send {Enter}
Send {Enter}
Return
; This application is for assigning "Mark Entry (Alt + Shift + X)" to phrases in
; MS Word documents. Point the mouse cursor at a word in the phrase and execute
; the hot key Winkey + z
; As long as the phrase is sufficiently discrete (e.g., on its own line, or part
; of a separate sentence) then the app will perform all five steps necessary to
; select the phrase (triple LMB click) assign Mark Entry, then acknowledge the Mark
; Entry dialog box twice with Enter, Enter
; Interestingly the following two are not identical in the result they produce
; in the MS Word document. The former one malfunctions . . . overwrites part of the
; phrase the cursor is pointing at with two black lines . . .
;
; #z:: SendInput {Lbutton 3} !+x {Enter 2}
; Return
;
; #z::
; SendInput {Lbutton 3}
; Send !+x
; Send {Enter}
; Send {Enter}
; Return