Jump to content

An Optional Gui!


themax90
 Share

Recommended Posts

So I was wondering one day, can I make a program run, and not have it have a GUI but at some points do, without going through GUI delete and creation. Here's a little wrapper that will make the GUI optional.

; ----------------------------------------------------------------------------
; AutoIt Version: 3.1.+++ (BETA 117)
; Author:        Max Gardner (AutoIt Smith;king.of.all@comcast.net)
; ----------------------------------------------------------------------------
HotKeySet("{F1}", "GUIStart")
GUIStart()
AdlibEnable("GetMsg", 10)
While 1
; Main Program (Service Running In Background)
WEnd
Func GetMsg()
    $GUIMsg = GUIGetMsg()
    If $GUIMsg = -3 Then GUIDelete($GUI)
; Deal with the message.
EndFunc
Func GUIStart()
    Global $GUIMsg
; Graphic User Interface
    Global $GUI = GUICreate("YourGUI")
    GUISetState()
EndFunc

Here's some code for all of you command line script kiddies. I hope you like. I know I havn't been around alot I just don't have the time.

Peace,

AutoIt Smith

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