satanttin Posted October 30, 2013 Posted October 30, 2013 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: expandcollapse popup#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
LiquidNitrogen Posted October 30, 2013 Posted October 30, 2013 (edited) 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 October 30, 2013 by ReaperX Formerly ReaperX
Moderators Melba23 Posted October 30, 2013 Moderators Posted October 30, 2013 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. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts