root/windows/neo-vars/src/source/initialize.ahk @ 1677

Revision 1677, 3.1 KB (checked in by mösi, 4 years ago)

Dynamisches Compose implementiert – allerdings noch recht starr und nicht EXE-tauglich.

Line 
1if (A_IsCompiled) {
2; Revisionsinformation bereits verf�gbar
3} else {
4; Revisionsinformation nicht verf�gbar oder nicht zuverl�ssig, neu generieren
5  if (FileExist(".svn")<>False) {
6    ; .svn existiert, scheint also ausgecheckt worden zu sein
7    RegRead,TSVNPath,HKLM,SOFTWARE\TortoiseSVN,Directory
8    RegRead,SVNPath,HKLM,SOFTWARE\CollabNet\Subversion\1.5.4\Client,Install Location
9    if (TSVNPath<>"") {
10      ; fein, TSVN ist installiert!
11      RunWait, "%TSVNPath%bin\SubWCRev.exe" "." "Source\_subwcrev1.tmpl.ahk" "Source\_subwcrev1.generated.ahk",,Hide
12      FileRead,TSVNRevFull,Source\_subwcrev1.generated.ahk
13      RegExMatch(TSVNRevFull,"""(.*)""",SubPat)
14      Revision := SubPat1
15    } else if (SVNPath<>"") {
16      ; fein, CollabNet-SVN-Client ist installiert!
17      RunWait, %comspec% /c ""%SVNPath%\svnversion.exe" "." >"Source\_svnversion.generated.txt"",,Hide
18      FileRead,SVNRevFull,Source\_svnversion.generated.txt
19      RegExMatch(SVNRevFull,"(.*)$",SubPat)
20      Revision := SubPat1
21    } else {
22      ; nichts installiert. Was jetzt?
23      Revision := "<unknown>"
24    }
25  } else {
26    ; kein .svn-Verzeichnis. Was jetzt?
27    Revision := "<unknown>"
28  }
29}
30
31name=Neo 2.0 r%Revision%-r%CompRevision% (%A_ScriptName%)
32enable=Aktiviere %name%
33disable=Deaktiviere %name%
34#LTrim ; Quelltext kann einger�ckt werden
35
36SetCapsLockState Off
37Gosub, SaveNumLockState
38SetNumLockState Off
39OnExit, exitprogram
40SetScrollLockState Off
41KeyboardLED(2,"off") ; deaktivieren, falls sie doch brennt
42
43EnvGet, WindowsEnvAppDataFolder, APPDATA
44ApplicationFolder = %WindowsEnvAppDataFolder%\NEO2
45FileCreateDir, %ApplicationFolder%
46ini = %ApplicationFolder%\NEO2.ini
47
48IniRead,zeigeLockBox,%ini%,Global,zeigeLockBox,1
49IniRead,zeigeModusBox,%ini%,Global,zeigeModusBox,1
50IniRead,UseMod4Light,%ini%,Global,UseMod4Light,1
51IniRead,striktesMod2Lock,%ini%,Global,striktesMod2Lock,0
52IniRead,dynamischesCompose,%ini%,Global,dynamischesCompose,0
53
54regread,inputlocale,HKEY_CURRENT_USER,Keyboard Layout\Preload,1
55regread,inputlocalealias,HKEY_CURRENT_USER,Keyboard Layout\Substitutes,%inputlocale%
56if (inputlocalealias<>inputlocale=%inputlocalealias% and inputlocale<>00000407) {
57  suspend   
58  regread,inputlocale,HKEY_LOCAL_MACHINE,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\%inputlocale%,Layout Text
59  msgbox, 48, Warnung!,
60    (
61    Nicht kompatibles Tastaturlayout:   
62    `t%inputlocale%   
63    `nDas deutsche QWERTZ muss als Standardlayout eingestellt 
64    sein, damit %name% wie erwartet funktioniert.   
65    `n�ndern Sie die Tastatureinstellung unter
66    `tSystemsteuerung   
67    `t-> Regions- und Sprachoptionen   
68    `t-> Sprachen
69    `t-> Details...   `n
70    )
71  exitapp
72}
73
74wasNonShiftKeyPressed := 0
75isShiftRPressed := 0
76isShiftLPressed := 0
77isShiftPressed := 0
78isMod2Locked := 0
79IsMod3RPressed := 0
80IsMod3LPressed := 0
81IsMod3Pressed := 0
82IsMod4RPressed := 0
83IsMod4LPressed := 0
84IsMod4Pressed := 0
85IsMod4Locked := 0
86EbeneAktualisieren()
87
88
89if (dynamischesCompose)
90  LoadCurrentCompose()
91else
92  LoadDefaultCompose()
Note: See TracBrowser for help on using the browser.