Jacxonia Posted November 26, 2010 Share Posted November 26, 2010 Hi, I would like to know if it is possible to make a script that exits as soon as a window called document1 closes? I tried it like his but it did not work! while 1 if not winexists("document1") then exit endif wend Thank You Jacxonia Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 26, 2010 Moderators Share Posted November 26, 2010 Guys,If you want to run really tight loop like that, you should put a Sleep(10) in there to stop the CPU being eaten up. 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...
Jacxonia Posted November 26, 2010 Author Share Posted November 26, 2010 (edited) @MELBA23 Yes but that is not the problem! No it still does not work!!! Please Help!!! and the name is right because i can say winactivate(document1) and it works! but nothing happends if i quit document1!! Edited November 26, 2010 by Jacxonia Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 26, 2010 Moderators Share Posted November 26, 2010 Jacxonia, What does the Au3 Window Info tool tell you about the window? Are you sure that the title never changes? What is the process that launches the window and is there only the one window for that process? 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...
Jacxonia Posted November 26, 2010 Author Share Posted November 26, 2010 I am 100% sure that the title is correct and it does not change! And Yes it is the only process called like that! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 26, 2010 Moderators Share Posted November 26, 2010 Jacxonia, Then does this work for you: While 1 If Not ProcessExists("Your_Process_Name") Then Exit Sleep(10) WEnd 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...
Tvern Posted November 26, 2010 Share Posted November 26, 2010 Keep in mind that a window doesn't have to be visible to exist and that, dependig on your WinTitleMatchMode, the title doesn't have to be an exact match. Try running this without "document1" open. If it shows you an array, there are windows that match, even if you can't see them. #include <array.au3> Global $aWindows = WinList("document1") If $aWindows[0][0] Then _ArrayDisplay($aWindows,"The following windows match the title") Else ConsoleWrite("No matching windows found" & @CRLF) EndIf antonioj84 1 Link to comment Share on other sites More sharing options...
Jacxonia Posted November 26, 2010 Author Share Posted November 26, 2010 (edited) @MElBA23 Yes that works for me! Thank you Edited November 26, 2010 by Jacxonia Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 26, 2010 Moderators Share Posted November 26, 2010 Jacxonia, Once again, what does the Au3 Window Info tool tell you about the window? What is its CLASS, title, visible and hidden text? And did you try looking for the process as I suggested? What process name did you use? 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
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 accountSign in
Already have an account? Sign in here.
Sign In Now