Jump to content
Sign in to follow this  
satanttin

Guidelete problem

Recommended Posts

satanttin

Hello,

First of all i want to tell you the script isn't a bot or whatever.

the problem i have is i want to close the gui's when i press X but not all. This works except when i close everything the game is still running but without any gui so i want to make it so i can't close the lastest gui unless i open another one first.

The script so far is:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>

Global $GMake, $GMenu, $GMain

Opt("GUIOnEventMode", 1)

New()
Func New()
$GMenu = GUICreate("Menu", 177, 130, -1, -1)
$BNewGame = GUICtrlCreateButton("New Game", 19, 3, 138, 30)
$BLoadGame = GUICtrlCreateButton("Load Game", 19, 38, 138, 30)
$Bnew = GUICtrlCreateButton("Optional", 19, 97, 138, 30)
GUIctrlSetOnEvent($BNewGame, "NewGame")
GUISetOnEvent($GUI_EVENT_CLOSE, "DelMenu")
GUISetState()
EndFunc

Func Main()
$GMain = GUICreate("Main", 177, 130, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "DelMain")
GUISetState()
EndFunc

Func Make()
$GMake = GUICreate("Make", 214, 116, -1, -1)
$IName = GUICtrlCreateInput("Name", 8, 8, 121, 21)
$IClass = GUICtrlCreateInput("Class", 8, 32, 121, 21)
$IRace = GUICtrlCreateInput("Race", 8, 56, 121, 21)
$BSubmitNew = GUICtrlCreateButton("Submit", 136, 88, 75, 25)
GUIctrlSetOnEvent($BSubmitNew, "NewGame")
GUISetOnEvent($GUI_EVENT_CLOSE, "DelMake")
GUISetState()
EndFunc

Func DelMenu()
   GUIDelete($GMenu)
EndFunc

Func DelMain()
   GUIDelete($GMain)
EndFunc

Func DelMake()
   GUIDelete($GMake)
EndFunc

Func NewGame()
   Make()
EndFunc

Func close()
    Exit
 EndFunc
 
 While 1
    Sleep(50)
WEnd

Hope someone can help me with this.

Greetz

Share this post


Link to post
Share on other sites
LiquidNitrogen

Just to clarify. If you click an option and it opens a new GUI, you want the previous GUI, or the one used to open the current GUI to close?

Edited by ReaperX

Formerly ReaperX

Share this post


Link to post
Share on other sites
Melba23

satanttin,

Despite your protestations, this script has a button "Load Game" and so it obviously falls under the category of "launcher" and thus falls foul of the "Launching, [...] games [...], regardless of the game" rule. Thread closed. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×