From 46f5d785b87833c98117e32ee1a8af5d14c1faea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=B6si?= Date: Fri, 13 Feb 2009 17:40:01 +0000 Subject: =?UTF-8?q?WieMitNeo=20wird=20jetzt=20in=20einer=20modalen=20Messa?= =?UTF-8?q?geBox=20ausgegeben,=20die=20mehr=20Platz=20erzaubt=20als=20ein?= =?UTF-8?q?=20TrayTip=20(laut=20AHK-Dokumentation=20max.=20255=20Zeichen).?= =?UTF-8?q?=20Sollte=20aber=20auf=20GUI=20ge=C3=A4ndert=20werden.=20Jede?= =?UTF-8?q?=20Compose-Sequenz=20wird=20zwei=20mal=20ausgegeben:=20Einmal?= =?UTF-8?q?=20als=20Zeichensequenz,=20das=20andere=20Mal=20als=20Tastenseq?= =?UTF-8?q?uenz.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.neo-layout.org@1658 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- windows/neo-vars/src/source/tools.ahk | 79 +++++++++++++++++++++++++++-------- 1 file changed, 62 insertions(+), 17 deletions(-) (limited to 'windows/neo-vars/src/source/tools.ahk') diff --git a/windows/neo-vars/src/source/tools.ahk b/windows/neo-vars/src/source/tools.ahk index 8410fce..38a42ee 100644 --- a/windows/neo-vars/src/source/tools.ahk +++ b/windows/neo-vars/src/source/tools.ahk @@ -513,38 +513,83 @@ SetFormat,Integer,h a += 256*b SetFormat,Integer,d a := "U" . substr("0000" . substr(a,3),-3) - wtt := CRC%a% . " " . CRK%a% . " " - if (wtt=="") { - TrayTip,Wie mit NEO,Keine Information`, wie %a% eingegeben werden kann!,10,1 - return - } -; MsgBox,% wtt - wmn := "" - loop,parse,wtt,%A_Space% + wmn := "Das Zeichen " . a . " kann wie folgt eingegeben werden:`r`n" + loop,parse,CRC%a%,%A_Space% { this_wmn := "" + this_wmnk := "" + nthis := 0 this_wtt := A_LoopField if (this_wtt == "") continue ; probably at first or last entry loop { if (this_wtt == "") break - this_char := substr(this_wtt,1,5) + this_char5 := substr(this_wtt,1,5) + this_char := this_char5 this_wtt := substr(this_wtt,6) if (CB%this_char% != "") this_char := CB%this_char% else if (CS%this_char% != "") this_char := CS%this_char% ; this_char will contain Uxxxx if no shortcut is present. Fix this here. - if (substr(this_char,-1) == ")+") - this_wmn .= this_char - else if (substr(this_wmn,-1) == ")+") - this_wmn .= "<" . this_char . ">" - else - this_wmn .= " <" . this_char . ">" + this_wmn .= " <" . this_char . ">" + if (CRK%this_char5% == "") { + nthis := 1 + this_wmnk .= " <" . this_char5 . ">" + } else + this_wmnk .= " " . KeyLong(CRK%this_char5%) } - wmn .= this_wmn . "`r`n" + if (this_wmn != "") + this_wmn := SubStr(this_wmn,2) + if (this_wmnk != "") + this_wmnk := SubStr(this_wmnk,2) + if (nthis == 1) + wmn .= "Wegen fehlender Tastenbelegung: Nicht als Compose:`r`n" + else + wmn .= "Als Compose:`r`n" + wmn .= this_wmn . "`r`noder`r`n" . this_wmnk . "`r`n`r`n" + } + + wmnk := KeyLong(CRK%a%) + if (wmnk != "") + wmn .= "Als Tastendruck:`r`n" . wmnk + else + wmn .= "Als Tastendruck nicht verfügbar!" + + if (wmn != "") + MsgBox,0,Wie mit NEO,% wmn + else + TrayTip,Wie mit NEO,Keine Information über %a% gefunden,10,1 +} + +KeyLong(key) { + global + num := 0 + twmnk := "" + loop,parse,key,%A_Space% + { + tis_wmn := "" + tis_wtt := A_LoopField + if (tis_wtt == "") + continue ; probably at first or last entry + tis_layer := substr(tis_wtt,3,1) + base_key_pos := "CP1" . substr(tis_wtt,4) + + base_key := %base_key_pos% + if (CB%base_key% != "") + base_key := CB%base_key% + else if (CS%base_key% != "") + base_key := CS%base_key% + + twmnk .= "/<" . CBS__M%tis_layer% . base_key . ">" + num := num + 1 } - TrayTip,Wie mit NEO,% wmn,10,1 + if (num == 0) + return "" + else if (num == 1) + return SubStr(twmnk,2) + else + return "(" . SubStr(twmnk,2) . ")" } -- cgit v1.2.3