summaryrefslogtreecommitdiffstats
path: root/windows/autohotkey/Compose
diff options
context:
space:
mode:
authormartin_r <martin_r@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2008-09-15 01:08:23 +0000
committermartin_r <martin_r@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2008-09-15 01:08:23 +0000
commit617adf85157eec87ff3fc4f177cb71af260539e7 (patch)
tree267abc0692a28f2c24f48e55745cb8b62bafb515 /windows/autohotkey/Compose
parent43433b3d799a0b7e89c0d856e47f8a6bf68049b8 (diff)
Compose-Automatisierung für den AHK
git-svn-id: https://svn.neo-layout.org@872 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to 'windows/autohotkey/Compose')
-rw-r--r--windows/autohotkey/Compose/AutoComp1.bas38
-rw-r--r--windows/autohotkey/Compose/AutoComp2.bas52
2 files changed, 90 insertions, 0 deletions
diff --git a/windows/autohotkey/Compose/AutoComp1.bas b/windows/autohotkey/Compose/AutoComp1.bas
new file mode 100644
index 0000000..ad740f6
--- /dev/null
+++ b/windows/autohotkey/Compose/AutoComp1.bas
@@ -0,0 +1,38 @@
+Rem Compose-AHK-Konverter
+Rem © 2008 Martin Paul Roppelt (m.p.roppelt@web.de) – GPL 2/3
+Rem
+Rem Basic-Datei für OpenOffice (2.4):
+Rem Dateipfade an das Zielsystem anpassen!
+Rem
+Rem Anleitung:
+Rem OpenOffice-Basic aufrufen (Alt-x,m,v,m; Alt-n).
+Rem Strg-a; Symbolleisten-Schaltfläche: BASIC-Quelltext einfügen, diese Datei auswählen.
+Rem Skript ausführen (Alt-x,m,a oder F5).
+
+
+Sub Main
+ Open "C:\Users\Martin_2\NEO\Compose\Compose.neo" For Input Lock Write As #1
+ Open "C:\Users\Martin_2\NEO\Compose\en_US.UTF-8" For Input Lock Write As #2
+ Open "C:\Users\Martin_2\Programmieren\NEO\ComposeList.txt" For Output Lock Read Write As #3
+
+ LeseDatei(1)
+ LeseDatei(2)
+
+ Close 1, 2, 3
+End Sub
+
+Sub LeseDatei(DateiNummer% as Integer)
+ While Not Eof(DateiNummer%)
+ Line Input #DateiNummer%, DateiZeile$
+ Dateizeile$ = LTrim(DateiZeile$)
+ If Left(DateiZeile$, 1) = "<" Then
+ DoppelpunktPosition% = InStr(DateiZeile$, ":")
+ Definition$ = RTrim( Left(DateiZeile$, DoppelpunktPosition% - 1) )
+ KlammerAufPosition1% = InStr(Definition$, "<")
+ KlammerZuPosition1% = InStr(Definition$, ">")
+ Taste1$ = Mid(Definition$, KlammerAufPosition1% + 1, KlammerZuPosition1% - KlammerAufPosition1% - 1)
+ If Taste1$ = "Multi_key" Then Print #3, DateiZeile$
+ End If
+ Wend
+End Sub
+
diff --git a/windows/autohotkey/Compose/AutoComp2.bas b/windows/autohotkey/Compose/AutoComp2.bas
new file mode 100644
index 0000000..dde2bae
--- /dev/null
+++ b/windows/autohotkey/Compose/AutoComp2.bas
@@ -0,0 +1,52 @@
+REM ***** BASIC *****
+
+'Programm zur Umwandlung einer ComposeList.txt-Datei in eine Compose.ahk-Datei.
+'© 14. und 15. Sept. 2008 Martin Paul Roppelt (m.p.roppelt@web.de) – GPL 2/3
+
+'Anleitung:
+'Pfade anpassen :-)
+'Alle Tabulatoren durch ein /einzelnes/ Leerzeichen ersetzen.
+'Skript ausführen.
+'Korrektur von ein paar ungelösten kleinen Problemchen:
+'Letzte Zeile der Ausgabedatei durch "}" ersetzen.
+'Folgende Zeilen abändern (muss man in der Quelldatei suchen!):
+'CheckCompUni("<t> <z>", 0xE04A", 0x) ->
+'CheckCompUni("<???? <????", 0x????) ->
+'CheckCompUni("<t> <z>", 0xE04A)
+'CheckCompUni("<?> <?>", 0x????)
+'Compose unter Windows genießen!
+
+Sub Main
+ Open "C:\Users\Martin_2\Programmieren\NEO\ComposeList16.txt" For Binary Lock Write As #1
+ Open "C:\Users\Martin_2\NEO\windows\autohotkey\Source\Compose.ahk" For Output Lock Read Write As #2
+ Print #2, "CheckCompose() {"
+ Print #2, "CheckCompUni("; chr(34);
+ Position& = -2
+ For Position& = 1 To Lof(1) Step 2
+ Get #1, Position&, a%
+ If a% = 10 Then
+ Print #2, ")" : Klammer% = 0: Kommentar% = 0: Quotedbl% = 0
+ Print #2, "CheckCompUni("; chr(34);
+ ElseIf a%=asc(":") Then
+ Print #2, chr(34); ", 0x";
+ Zeichen% = 1
+ ElseIf a%=asc(" ") Then
+ ElseIf a%=asc("<") Then
+ Klammer% = Klammer% + 1
+ If Klammer% > 2 Then Print #2, " ";
+ If Klammer% <> 1 and Kommentar% <> 1 Then Print #2, "<";
+ ElseIf a% = 34 Then
+ Quotedbl% = Quotedbl% + 1
+ If Quotedbl% = 2 Then
+ Kommentar% = 1
+ Zeichen = 0
+ EndIf
+ ElseIf Klammer% <> 1 and a% < 255 and a% > 0 and Kommentar% <> 1 and Zeichen% <> 1 Then
+ Print #2, Chr(a%);
+ ElseIf Klammer% <> 1 and Kommentar% <> 1 Then
+ If a% <> -257 Then Print #2, Iif(Len(Hex(a%))>4, Right(Hex(a%),4),Hex(a%));
+ End If
+ Next
+ Print #2, "}"
+ Close 1, 2
+End Sub