aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2020-12-29 20:56:12 +0100
committerJohn Ankarström <john@ankarstrom.se>2020-12-29 20:56:12 +0100
commit9c38c32e307e6f76bf9f8b29af511bf747588df8 (patch)
treef14fad2f1ff0efa7516c4a7d470a2268851be1b7
parent441822fd0d18f2387183cf3863363158fbc27295 (diff)
downloadahk-9c38c32e307e6f76bf9f8b29af511bf747588df8.tar.gz
kompozer: Add tag menu hotkeys
-rw-r--r--tt.programs.kompozer.ahk74
1 files 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