Jump to content

Why wont you hide?!


 Share

Recommended Posts

#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 by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

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 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...