djbj90 Posted April 19, 2013 Share Posted April 19, 2013 (edited) Hello guys, i'm new to autoIt and I have a problem with Gui's I have 3 Scripts : Script1 #include <GUIConstantsEx.au3> $GUI = GUICreate("Window 1",300, 300, 0) $EQUILABEL = GUICtrlCreateLabel("Hello !", 100, 100, 50) GUISetState(@SW_SHOW) While 1 $NMSG = GUIGetMsg() Switch $NMSG Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Script2 #include <GUIConstantsEx.au3> $GUI = GUICreate("Window 2", 300, 300, 300) $EQUILABEL = GUICtrlCreateLabel("Hello !", 100, 100, 50) GUISetState(@SW_SHOW) While 1 $NMSG = GUIGetMsg() Switch $NMSG Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Script3 expandcollapse popup#include <GUIConstantsEx.au3> $Script1 = Run(@ScriptDir & "\Script1.exe", @ScriptDir) $Script2 = Run(@ScriptDir & "\Script2.exe", @ScriptDir) Sleep(500) $GUI = GUICreate("Manage Scripts", 300, 300, @DesktopWidth - 450) $LABELSCRIPT1 = GUICtrlCreateLabel("Script1", 40, 100, 50) $SHOWSCRIPT1 = GUICtrlCreateButton("Show", 15, 120, 50, 30) $HIDESCRIPT1 = GUICtrlCreateButton("Hide", 65, 120, 50, 30) $LABELSCRIPT2 = GUICtrlCreateLabel("Script2", 205, 100, 50) $SHOWSCRIPT2 = GUICtrlCreateButton("Show", 175, 120, 50, 30) $HIDESCRIPT2 = GUICtrlCreateButton("Hide", 225, 120, 50, 30) GUISetState(@SW_SHOW) While 1 $NMSG = GUIGetMsg() Switch $NMSG Case $GUI_EVENT_CLOSE Exit Case $SHOWSCRIPT1 $WINDOW = GETHWNDFROMPID($Script1) WinSetState($WINDOW, "", @SW_SHOW) Case $HIDESCRIPT1 $WINDOW = GETHWNDFROMPID($Script1) WinSetState($WINDOW, "", @SW_HIDE) Case $SHOWSCRIPT2 $WINDOW = GETHWNDFROMPID($Script2) WinSetState($WINDOW, "", @SW_SHOW) Case $HIDESCRIPT2 $WINDOW = GETHWNDFROMPID($Script2) WinSetState($WINDOW, "", @SW_HIDE) EndSwitch WEnd -Script1 and Script2 make 2 windows with "Hello" in them. -Script3 make a windows, with buttons for show/hide the Script1 and Script2 windows. So i run the 3rd script, and i can show/hide the others. But there is something i doesn't understand, if i do this: 1)Show the script1 2)Close it by his red cross 3)Show the script1 (doesn't work, normal) If i do this, my 3rd script doesn't give response, and the window is frozen, i can't close it with red cross. There is a solution for solve it ? Thanks for answers. Edited April 19, 2013 by djbj90 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 19, 2013 Moderators Share Posted April 19, 2013 djbj90,I see you did not read those rules very well. I take it you did not see the one which reads: "Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above"Do NOT start a third thread. 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 Link to comment Share on other sites More sharing options...
Recommended Posts