Hi,
I'm playing around with this code to wrap window's cmd.exe into a gui, right now I have this, but the command window inside moveable, and I want to restrict that. Also there is some refresh problems too. Does anyone have any experience working with the console?
Code:
run,cmd,,,CmdPid
WinWait, ahk_pid %CmdPid%
; Get Windows Properties
WinGetPos,,,CmdW,CmdH, ahk_pid %CmdPid%
WinMove, ahk_pid %CmdPid%,,2,22
; Disable command from being interacted with
; WinSet,Disable,, ahk_pid %CmdPid%
; Create Gui
Gui,+Lastfound +Resize
Gui,Margin,2,2
GUI_ID := WinExist()
WinGet, CmdId, ID, ahk_pid %CmdPid%
DllCall("SetParent", "uint", CmdId, "uint", GUI_ID)
Gui,Add,StatusBar,,Start Dyna
Gui,Add,Button,Ym gRefresh, Refresh
Gui,Show,% "W" CmdW "H" CmdH+40 ,%KillFile%
Refresh:
WinSet,Redraw,, ahk_id %CmdId%
return
GuiClose:
WinClose, ahk_id %CmdId%
Exitapp
return