Sign in to follow this  
Followers 0
AzKay

Why wont you hide?!

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 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]

Share this post


Link to post
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
Sign in to follow this  
Followers 0