AzKay Posted August 4, 2006 Share Posted August 4, 2006 (edited) expandcollapse popup#include <GUIConstants.au3> #NoTrayIcon HotKeySet("^{PGUP}", "_Hide") HotKeySet("^{PGDN}", "_Show") Opt("GUIOnEventMode", 1) ### Koda GUI section start ### $Form1 = GUICreate("Command", 267, 115, 191, 117) $Commands = GUICtrlCreateEdit("", 0, 0, 265, 89, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetData($Commands, "net localgroup"&@CRLF&"net localgroup groupname /ADD"&@CRLF&"net localgroup groupname /DELETE"&@CRLF&"net user groupname username /ADD"&@CRLF&"net user groupname username password /ADD"&@CRLF&"net user groupname username /DELETE") $CmdCom = GUICtrlCreateButton("Run Command", 0, 88, 265, 25, 0) GUICtrlSetOnEvent(-1, "CmdComClick") GUISetState(@SW_SHOW) GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit") GUISetOnEvent($GUI_EVENT_MINIMIZE, "_Minimize") ### Koda GUI section end ### Dim $ComSpec While 1 Sleep(100) WEnd Func CmdComClick() $ComSpec = Run(@ComSpec) EndFunc Func _Quit() Exit EndFunc Func _Minimize() GUISetState(@SW_MINIMIZE) EndFunc Func _Hide() GUISetState(@SW_HIDE) WinSetState($ComSpec, "", @SW_HIDE) EndFunc Func _Show() GUISetState(@SW_SHOW) WinSetState($ComSpec, "", @SW_SHOW) EndFunc I was thinking this way, would be better than using a GUI version, soooo. My problem is, the command prompt wont hide. Only the GUI hides, but the command prompt doesnt. Anyone know why? Edited August 4, 2006 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
eynstyne Posted August 4, 2006 Share Posted August 4, 2006 (edited) I don't think it will wont work with command.com, but it will work with cmd.exe The window title for cmd is the full path. Command.com (@compsec) just dumps you in the root drive Edited August 4, 2006 by eynstyne F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent] Link to comment Share on other sites More sharing options...
AzKay Posted August 4, 2006 Author Share Posted August 4, 2006 Fixed: Func _Hide() GUISetState(@SW_HIDE) WinSetState(@SystemDir & "\cmd.exe", "", @SW_HIDE) EndFunc Func _Show() GUISetState(@SW_SHOW) WinSetState(@SystemDir & "\cmd.exe", "", @SW_SHOW) EndFunc # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now