Probleme mit der Darstellung der deutschen Buchstaben ( umlaut , ß .. )
Problem in diesem Teil ( ? )
Code: Select all
;--------------------- DOS commands -----
fcdm=%a_scriptdir%\doscommands_new2.txt
ifnotexist,%fcdm%
runwait,%comspec% /c help >"%fcdm%",,hide,
;-----------------------------------------
Code: Select all
#warn
setworkingdir,%a_scriptdir%
Gui,2:default
Gui,2: -DPIScale
Gui,2:color,black,black
Gui,2:Font,s12 cYellow,Lucida Console
DetectHiddenWindows On
autotrim,off
transform,s,chr,32
wa:=A_screenwidth
ha:=A_screenHeight
xx:=100
DllCall("AllocConsole")
;DllCall("AttachConsole")
;DllCall("AttachConsole", "UInt", pid)
WinHide % "ahk_id " DllCall("GetConsoleWindow", "ptr")
;WinMinimize % "ahk_id " DllCall("GetConsoleWindow", "uint")
objShell := ComObjCreate("WScript.Shell")
;---------------
gosub,readLB
;---------------
x:=(wa*1)/xx ,y:=(ha*1)/xx,h:=(ha*50)/xx,w:=(wa*10)/xx
Gui,2:Add,Listbox,x%x% y%y% w%w% h%h% vLB1 gLB1,%e1x%
x:=(wa*12)/xx,y:=(ha*1)/xx,h:=(ha*50)/xx,w:=(wa*68)/xx
Gui,2:Add,Edit, x%x% y%y% h%h% w%w% vED1 cYellow,
x:=(wa*.1)/xx,y:=(ha*.1)/xx,h:=(ha*53)/xx,w:=(wa*80)/xx
Gui,2:Show, x%x% y%y% w%w% h%h% ,DOS-HELP
return
;----------------------------------------------
2Guiescape:
2Guiclose:
DllCall("FreeConsole")
sleep,200
exitapp
;----------------------------------------------
;----------------------------------------------
lb1:
gui,2:submit,nohide
GuiControl,2:,ED1,
objExec := objShell.Exec(ComSpec " /c " . lb1 . "`n")
cl:=""
while, !objExec.StdOut.AtEndOfStream
cl:= objExec.StdOut.ReadAll()
GuiControl,2:,ED1,%Cl%
cl:=""
return
;----------------------------------------------
;----------------------------------------------
readLB:
;--------------------- DOS commands -----
fcdm=%a_scriptdir%\doscommands_new2.txt
ifnotexist,%fcdm%
runwait,%comspec% /c help >"%fcdm%",,hide,
;-----------------------------------------
i=0
e1x:=""
fileread,a,%fcdm%
loop,parse,a,`n,`r ;- parse each line
{
i++
if (i<3) ;- remove at least the first two lines from help
continue
y1=%a_loopfield%
stringmid,y2,y1,1,3
if (y1="" or y2=" ")
{
y1=
y2=
continue
}
c1=
stringsplit,c,y1,%s%
if (c1="dir" or c1="ver" or c1="path" or c1="chcp")
e1x .= c1 . "|"
e1x .= c1 . " /?|"
}
a=
return
;================= END SCRIPT ================================================
esc::exitapp