djbj90 Posted April 19, 2013 Share Posted April 19, 2013 (edited) Hi everybody,I started AutoIt this morning and i have a big problem, i don't find how to solve it.I looked the doc but maybe i don't look at the right place.My script does this :- Run some .exe hidden- Create a GUI with buttons for show/hide windows associated with these .exe ran.expandcollapse popup; Launch the .exe $WORLD = Run(@ScriptDir & "\Core\WorldLServer Extasis.exe", @ScriptDir & "\Core\", @SW_HIDE) $MAIN = Run(@ScriptDir & "\Core\MainLServer 496.exe", @ScriptDir & "\Core\", @SW_HIDE) Sleep(500) ;Create the GUI with buttons $GUI = GUICreate("Manager", 450, 600, @DesktopWidth - 450) ; don't care of the size, there is 8 .exe in reality $WORLDLABEL = GUICtrlCreateLabel("World server", 355, 380, 70) $SHOWWORLD = GUICtrlCreateButton("Show", 335, 400, 50, 30) $HIDEWORLD = GUICtrlCreateButton("Hide", 385, 400, 50, 30) $MAINLABEL = GUICtrlCreateLabel("Main Server", 35, 535, 70) $SHOWMAIN = GUICtrlCreateButton("Show", 15, 555, 50, 30) $HIDEMAIN = GUICtrlCreateButton("Hide", 65, 555, 50, 30) GUISetState(@SW_SHOW) ;Main While 1 $MSG = GUIGetMsg() Switch $MSG Case $GUI_EVENT_CLOSE Exit Case $SHOWWORLD $WINDOW = GETWINDOWFROMPID($WORLD) WinSetState($WINDOW, "", @SW_SHOW) Case $HIDEWORLD $WINDOW = GETWINDOWFROMPID($WORLD) WinSetState($WINDOW, "", @SW_HIDE) Case $SHOWMAIN $WINDOW = GETWINDOWFROMPID($MAIN) WinSetState($WINDOW, "", @SW_SHOW) Case $HIDEMAIN $WINDOW = GETWINDOWFROMPID($MAIN) WinSetState($WINDOW, "", @SW_HIDE) EndSwitch WEnd ;GETWINDOWFROMPID function Func GETWINDOWFROMPID($PID) $HWND = 0 $STPID = DllStructCreate("int") Do $WINLIST2 = WinList() For $I = 1 To $WINLIST2[0][0] If $WINLIST2[$I][0] <> "" Then DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $WINLIST2[$I][1], "ptr", DllStructGetPtr($STPID)) If DllStructGetData($STPID, 1) = $PID Then $HWND = $WINLIST2[$I][1] ExitLoop EndIf EndIf Next Sleep(100) Until $HWND <> 0 Return $HWND EndFuncSo, this script works fine, I have my GUI with buttons show/hide and when i click on them, my windows show/hide.The problem is :-> When I show a window, and close it with the red cross, my GUI (and all my script) doesn't answer anymore... I can't clic on show/hide for others windows and I can't even close my GUI with her red cross.Why ? Do you have anything for solve this ?Thanks for answers, Sorry for my bad english. 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,Welcome to the AutoIt forum. I suggest you post the code so that we can take a look. Please use Code tags when you do - put [autoit] before and [/autoit] after your posted code - so that you get a scrolling box and syntax colouring which makes the code easier to read. M23P.S. Please just use the standard forum font in future - that blue background makes it very hard to read. 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...
djbj90 Posted April 19, 2013 Author Share Posted April 19, 2013 Thank you very much for the balise. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 19, 2013 Moderators Share Posted April 19, 2013 djbj90,Would this be a manager for various game servers by any chance? Please read the Forum rules (there is also a link at bottom right of each page) and make sure that you are legal. 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...
djbj90 Posted April 19, 2013 Author Share Posted April 19, 2013 Yes it is, but for only one game especially, and i have full rights. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 19, 2013 Moderators Share Posted April 19, 2013 djbj90, That is immaterial - if the script deals with a game of any description the thread falls foul of the rules and will be 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 Link to comment Share on other sites More sharing options...
Recommended Posts