From 9c38c32e307e6f76bf9f8b29af511bf747588df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 29 Dec 2020 20:56:12 +0100 Subject: kompozer: Add tag menu hotkeys --- tt.programs.kompozer.ahk | 74 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 6 deletions(-) diff --git a/tt.programs.kompozer.ahk b/tt.programs.kompozer.ahk index 639ea3b..69637dc 100644 --- a/tt.programs.kompozer.ahk +++ b/tt.programs.kompozer.ahk @@ -32,11 +32,73 @@ Sleep, 100 SendInput, {Enter}{Esc}^s return -F1:: ; update table of contents (h2-h6) ++AppsKey:: ; open tag menu +MouseGetPos, mx, my +WinGetPos,,, w, h +MouseMove, % w - 40, % h - 20, 0 +SendInput, {RButton} +MouseMove, % mx, % my, 0 +return + +F1:: ; open advanced properties for tag +MouseGetPos, mx, my +WinGetPos,,, w, h +MouseMove, % w - 40, % h - 20, 0 +SendInput, {RButton}{Up}{Enter} +MouseMove, % mx, % my, 0 +return + +F2:: ; open inline styles for tag +MouseGetPos, mx, my +WinGetPos,,, w, h +MouseMove, % w - 40, % h - 20, 0 +SendInput, {RButton}{Up}{Up}{Enter} +MouseMove, % mx, % my, 0 +return + +F8:: ; class=left +MouseGetPos, mx, my +WinGetPos,,, w, h +if (Counter() & 1) ; odd + MouseMove, % w - 40, % h - 25, 0 +else + MouseMove, % w - 40, % h - 15, 0 +SendInput, {RButton}{Up}{Up}{Up}{Right}l +MouseMove, % mx, % my, 0 +return + +F9:: ; class=clear +MouseGetPos, mx, my +WinGetPos,,, w, h +if (Counter() & 1) ; odd + MouseMove, % w - 40, % h - 25, 0 +else + MouseMove, % w - 40, % h - 15, 0 +SendInput, {RButton}{Up}{Up}{Up}{Right}c +MouseMove, % mx, % my, 0 +return + +;; -> library + +Counter() +{ + static clicks := 0 + clicks += 1 + return clicks +} + +;; -> body + +; ____ +; |_ _| +; | | a b l e o f c o n t e n t s +; |_| + +F5:: ; update table of contents (h2-h6) SendInput, !ibu goto toc1 -+F1:: ; create table of contents (h2-h6) ++F5:: ; create table of contents (h2-h6) SendInput, !ibi goto toc1 @@ -45,11 +107,11 @@ Sleep, 100 SendInput, h2{Tab}{Tab}h3{Tab}{Tab}-{Tab}-{Tab}-{Tab}-{Enter} return -F2:: ; update table of contents (h2 only) +F6:: ; update table of contents (h2 only) SendInput, !ibu goto toc2 -+F2:: ; create table of contents (h2 only) ++F6:: ; create table of contents (h2 only) SendInput, !ibi goto toc2 @@ -58,11 +120,11 @@ Sleep, 100 SendInput, h2 goto toc4 -F3:: ; update table of contents (h3 only) +F7:: ; update table of contents (h3 only) SendInput, !ibu goto toc3 -+F3:: ; create table of contents (h3 only) ++F7:: ; create table of contents (h3 only) SendInput, !ibi goto toc3 -- cgit v1.2.3