| 1 | if (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 | |
|---|
| 31 | name=Neo 2.0 r%Revision%-r%CompRevision% (%A_ScriptName%) |
|---|
| 32 | enable=Aktiviere %name% |
|---|
| 33 | disable=Deaktiviere %name% |
|---|
| 34 | #LTrim ; Quelltext kann eingerückt werden |
|---|
| 35 | |
|---|
| 36 | NEONumLockLEDState := "Off" |
|---|
| 37 | NEOCapsLockLEDState := "Off" |
|---|
| 38 | NEOScrollLockLEDState := "Off" |
|---|
| 39 | SetNEOLockStates() |
|---|
| 40 | OnExit, exitprogram |
|---|
| 41 | |
|---|
| 42 | EnvGet, WindowsEnvAppDataFolder, APPDATA |
|---|
| 43 | if (WindowsEnvAppDataFolder == "") { |
|---|
| 44 | EnvGet, WindowsEnvAppDataFolder, USERPROFILE |
|---|
| 45 | WindowsEnvAppDataFolder .= "\Anwendungsdaten" |
|---|
| 46 | } |
|---|
| 47 | ApplicationFolder = %WindowsEnvAppDataFolder%\NEO2 |
|---|
| 48 | FileCreateDir, %ApplicationFolder% |
|---|
| 49 | ini = %ApplicationFolder%\NEO2.ini |
|---|
| 50 | |
|---|
| 51 | IniRead,zeigeLockBox,%ini%,Global,zeigeLockBox,1 |
|---|
| 52 | IniRead,zeigeModusBox,%ini%,Global,zeigeModusBox,1 |
|---|
| 53 | IniRead,UseMod4Light,%ini%,Global,UseMod4Light,1 |
|---|
| 54 | IniRead,striktesMod2Lock,%ini%,Global,striktesMod2Lock,0 |
|---|
| 55 | IniRead,dynamischesCompose,%ini%,Global,dynamischesCompose,0 |
|---|
| 56 | |
|---|
| 57 | regread,inputlocale,HKEY_CURRENT_USER,Keyboard Layout\Preload,1 |
|---|
| 58 | regread,inputlocalealias,HKEY_CURRENT_USER,Keyboard Layout\Substitutes,%inputlocale% |
|---|
| 59 | |
|---|
| 60 | if (inputlocalealias<>"") |
|---|
| 61 | inputlocale:=inputlocalealias |
|---|
| 62 | |
|---|
| 63 | if (inputlocale<>"00000407" and inputlocale<>"00000807" and inputlocale<>"00010407") { |
|---|
| 64 | suspend |
|---|
| 65 | regread,inputlocale,HKEY_LOCAL_MACHINE,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\%inputlocale%,Layout Text |
|---|
| 66 | msgbox, 48, Warnung!, |
|---|
| 67 | ( |
|---|
| 68 | Nicht kompatibles Tastaturlayout: |
|---|
| 69 | `t%inputlocale% |
|---|
| 70 | `nDas deutsche QWERTZ muss als Standardlayout eingestellt |
|---|
| 71 | sein, damit %name% wie erwartet funktioniert. |
|---|
| 72 | `n�ndern Sie die Tastatureinstellung unter |
|---|
| 73 | `tSystemsteuerung |
|---|
| 74 | `t-> Regions- und Sprachoptionen |
|---|
| 75 | `t-> Sprachen |
|---|
| 76 | `t-> Details... `n |
|---|
| 77 | ) |
|---|
| 78 | exitapp |
|---|
| 79 | } |
|---|
| 80 | |
|---|
| 81 | wasNonShiftKeyPressed := 0 |
|---|
| 82 | isShiftRPressed := 0 |
|---|
| 83 | isShiftLPressed := 0 |
|---|
| 84 | isShiftPressed := 0 |
|---|
| 85 | isMod2Locked := 0 |
|---|
| 86 | IsMod3RPressed := 0 |
|---|
| 87 | IsMod3LPressed := 0 |
|---|
| 88 | IsMod3Pressed := 0 |
|---|
| 89 | IsMod4RPressed := 0 |
|---|
| 90 | IsMod4LPressed := 0 |
|---|
| 91 | IsMod4Pressed := 0 |
|---|
| 92 | IsMod4Locked := 0 |
|---|
| 93 | EbeneAktualisieren := "NEOEbeneAktualisieren" |
|---|
| 94 | |
|---|
| 95 | SetNEOLockStates() { |
|---|
| 96 | global |
|---|
| 97 | SavedNumLockState := GetKeyState("NumLock","T") |
|---|
| 98 | SavedScrollLockState := GetKeyState("ScrollLock","T") |
|---|
| 99 | SavedCapsLockState := GetKeyState("CapsLock","T") |
|---|
| 100 | SwitchIs0 := "Off" |
|---|
| 101 | SwitchIs1 := "On" |
|---|
| 102 | SavedNumLockState := SwitchIs%SavedNumLockState% |
|---|
| 103 | SavedScrollLockState := SwitchIs%SavedScrollLockState% |
|---|
| 104 | SavedCapsLockState := SwitchIs%SavedCapsLockState% |
|---|
| 105 | SetNumLockState, On |
|---|
| 106 | SetScrollLockState, Off |
|---|
| 107 | SetCapsLockState, Off |
|---|
| 108 | Sleep,1 |
|---|
| 109 | UpdateNEOLEDS() |
|---|
| 110 | } |
|---|
| 111 | |
|---|
| 112 | SetOldLockStates() { |
|---|
| 113 | global |
|---|
| 114 | UpdateOldLEDS() |
|---|
| 115 | Sleep,1 |
|---|
| 116 | SetNumLockState,% SavedNumLockState |
|---|
| 117 | SetScrollLockState,% SavedScrollLockState |
|---|
| 118 | SetCapsLockState,% SavedCapsLockState |
|---|
| 119 | } |
|---|
| 120 | |
|---|
| 121 | %EbeneAktualisieren%() |
|---|
| 122 | |
|---|
| 123 | ActivateLayOut(inputlocale) |
|---|
| 124 | |
|---|
| 125 | TheKeys() |
|---|
| 126 | |
|---|
| 127 | if (dynamischesCompose) |
|---|
| 128 | LoadCurrentCompose() |
|---|
| 129 | else |
|---|
| 130 | LoadDefaultCompose() |
|---|