Copy link to clipboard
Copied
Dear friends and experts,
Since many years I create utilities with AutoHotKey (AHK) which send keystrokes to applications. This is very simple for all application but FM > 8.
To just send to the current window the command is
Send {ESC}id
If I want to insert a longer text, this is first put into the paste buffer and then sent with ^v
To target a specific window the window is activated with reference to the window title:
WinActivate, Adobe FrameMaker
Send, {ESC}id ; Focus indocument
This works until FM-8, but not with the later versions using the 'new interface'.
Although AHK still regcognises a window title (Adobe FrameMaker), this can not be used. Also the statement
WinActivate AHK_EXE FrameMaker.exe
activates something, but it is not the main window. It turns out to activate the last opened sub-window, in my case the graphic toolbar.
Then I try
WinActivate ahk_class FrameFamily15.MdiFrame
This has the same effect, although I see that the window is activated. Using CTRL+f opens the Find/Change pane and brings the window in a perceptive state. Further AHK activations work as expected.
Finally I do the following to be able to work right from the beginning when FM was opened and a document is active with the cursor at a position to work from:
fmVersion := "15" ; 10 … 16
If !WinExist("ahk_class FrameFamily" . fmVersion . ".MdiFrame") {
MsgBox, 48, Error, FrameMaker window was not found. Exiting.
ExitApp
} Else WinActivate
WinGetPos,,, width
MouseClick,, width - 350, 10
SendKeyStrokes("Where are we?")
This sends to text to the current location.
The mouse moves to a position left to the icons top right in the FM window and clicks.
Only this way I am completely free what I do next.
Side note
As I complained elsewhere more than once, there is no easily recognisable indication, that the window is active by the title bar colouring. There is only a light difference in gray level of the top right icon area:
From
to
Have something to add?