svenjatzu Posted April 8, 2020 Share Posted April 8, 2020 Hi coders, ive got a lil problem with closing a window. The windowtitel got a countdown inside so that i cant set the window tittel someone got an idea how to make it? eg its like au3.info: titel: 59m:50s - text the timer goes down to 0 Link to comment Share on other sites More sharing options...
TheXman Posted April 8, 2020 Share Posted April 8, 2020 (edited) What have you tried? None of the advanced title matching techniques have worked? https://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Edited April 8, 2020 by TheXman CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
svenjatzu Posted April 8, 2020 Author Share Posted April 8, 2020 Thanks for you replay TheXman no those ways dont work for me But i found an post that helped me out "" There is a option named "WinTitleMatchMode", if you change this to 2 then it will match any substring in the title (Help file). Here's how: Opt("WinTitleMatchMode",2) WinActivate("Test Application") "" so now i got 3 windows opened im looking for close the browser with the name "Test Application" The way to close the browsers with the name i did it is not lets say clean but it works XD ShellExecute("C:\3.lnk") Sleep(3000) ShellExecute("C:\4.lnk") Sleep(3000) ShellExecute("C:\5.lnk") Opt("WinTitleMatchMode",2) WinWait("Test App") WinClose("Test App") Opt("WinTitleMatchMode",2) WinWait("Test App") WinClose("Test App") Opt("WinTitleMatchMode",2) WinWait("Test App") WinClose("Test App") WinWaitClose("[CLASS:Chrome_WidgetWin_1]") MsgBox(1,"","",0) maybe you got a cleaner way to close the windows ? Link to comment Share on other sites More sharing options...
TheXman Posted April 8, 2020 Share Posted April 8, 2020 It talks about WinTitleMatchMode on the page that I referenced in my original post. As a matter of fact, it's on the first line of the page and the part right below that shows the different modes. Obviously you didn't read it. I not wasting anymore of my time. FrancescoDiMuro and svenjatzu 2 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
svenjatzu Posted April 9, 2020 Author Share Posted April 9, 2020 Hi coders here i am again : ) ive created this code. i run 6 windows at same time, when the browsertitel shows "free" the window where its shown sould close. most of the times it also works. but lets say about 1/4 of the time the window doesnt close. can you pelase have a look where the error is inside? expandcollapse popup#RequireAdmin ShellExecute("C:\1.lnk") Sleep(3000) ShellExecute("C:\2.lnk") Sleep(3000) ShellExecute("C:\3.lnk") Sleep(3000) ShellExecute("C:\4.lnk") Sleep(3000) ShellExecute("C:\5.lnk") Sleep(3000) ShellExecute("C:\6.lnk") Sleep(30000*5) Opt("WinTitleMatchMode",2) ;~ WinWait(" free") WinClose(" free") Sleep(5000) Opt("WinTitleMatchMode",2) ;~ WinWait(" free") WinClose(" free") Sleep(5000) Opt("WinTitleMatchMode",2) ;~ WinWait(" free") WinClose(" free") Sleep(5000) Opt("WinTitleMatchMode",2) ;~ WinWait(" free") WinClose(" free") Sleep(5000) Opt("WinTitleMatchMode",2) WinWait(" free") WinClose(" free") Sleep(5000) Opt("WinTitleMatchMode",2) WinWait(" free") WinClose(" free") WinWaitClose("[CLASS:Chrome_WidgetWin_1]") Sleep(5000) ShellExecute(@ScriptDir & "\2.exe") Link to comment Share on other sites More sharing options...
Danp2 Posted April 9, 2020 Share Posted April 9, 2020 You should check the return value from WinClose Can you tell us the website's URL? How is this thread different from your earlier one? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2020 Developers Share Posted April 9, 2020 @svenjatzu, Topics merged and stick to one thread per topic please! Jos svenjatzu 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
seadoggie01 Posted April 9, 2020 Share Posted April 9, 2020 Like Danp2 said, check WinClose's return It looks like you have a space before free, check that. Also, Opt is usually used once at the top of your script. It sets that option until it is changed by another Opt line, or the script ends. And this is nitpicking, but "My brain hurts!": Why are you using 30,000 * 5? I'm sure you know what that is multiplied out, and if you're going to use multiplication in your script like that, at least have it make sense... like displaying it in minutes: 2.5 * (60 * 1000) svenjatzu 1 All my code provided is Public Domain... but it may not work. Use it, change it, break it, whatever you want. Spoiler My Humble Contributions:Personal Function Documentation - A personal HelpFile for your functionsAcro.au3 UDF - Automating Acrobat ProToDo Finder - Find #ToDo: lines in your scriptsUI-SimpleWrappers UDF - Use UI Automation more Simply-erKeePass UDF - Automate KeePass, a password managerInputBoxes - Simple Input boxes for various variable types Link to comment Share on other sites More sharing options...
svenjatzu Posted April 9, 2020 Author Share Posted April 9, 2020 6 hours ago, seadoggie01 said: Like Danp2 said, check WinClose's return It looks like you have a space before free, check that. Also, Opt is usually used once at the top of your script. It sets that option until it is changed by another Opt line, or the script ends. And this is nitpicking, but "My brain hurts!": Why are you using 30,000 * 5? I'm sure you know what that is multiplied out, and if you're going to use multiplication in your script like that, at least have it make sense... like displaying it in minutes: 2.5 * (60 * 1000) Like Danp2 said, check WinClose's return how to check the return ? Link to comment Share on other sites More sharing options...
Developers Jos Posted April 9, 2020 Developers Share Posted April 9, 2020 1 minute ago, svenjatzu said: how to check the return ? Helpfile is your friend svenjatzu 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
svenjatzu Posted April 9, 2020 Author Share Posted April 9, 2020 3 hours ago, Jos said: Helpfile is your friend helpfile is dangerous it makes ppl smart 😑 Link to comment Share on other sites More sharing options...
Nine Posted April 10, 2020 Share Posted April 10, 2020 (edited) 3 hours ago, svenjatzu said: helpfile is dangerous it makes ppl smart Unless they are dumb Edited April 10, 2020 by Nine svenjatzu 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy 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