unchiusm Posted December 4, 2018 Posted December 4, 2018 Hey there. I've been having this problem for a day now while trying to automate a software . Basically a window pops up with a lengthy name consists of [Document Type] , [Vehicle name] , [Start Date] , [End Date] The only way I can ControlClick a button on this popup window if I write the full name into ControlClick which looks something like this : ControlClick ("Foaie de parcurs a AR-01079 pt perioada: 01.12.2018 00:00-01.12.2018 23:59" , "" , "WindowsForms10.BUTTON.app.0.33c0d9d") I've tried many ways but it didn't work . I found a way tough to get the full name of the title with the Function WinGetTitle , which looks something like this. Opt('WinTitleMatchMode', 2) Global $Win = 'Foaie de parcurs', $GetTitle While 1 $GetTitle = WinGetTitle($Win) If WinExists($Win) Then MsgBox(64, 'Info', 'The full Title is: ' & @CR & $GetTitle) Sleep(10) WEnd My question is how can I insert the GetTitle full name into the Title Name of the following code. ControlClick ("I want to it to automatically write itself here after GetTitle" , "" , "WindowsForms10.BUTTON.app.0.33c0d9d") Thanks alot guys , this would hugely help me .
unchiusm Posted December 4, 2018 Author Posted December 4, 2018 Would it be something similar to this ? Opt('WinTitleMatchMode', 2) Global $Win = 'Foaie de parcurs', $GetTitle While 1 $GetTitle = WinGetTitle($Win) If WinExists($Win) then ControlClick ("& @CR & $GetTitle" ,"","WindowsForms10.BUTTON.app.0.33c0d9d8") Sleep(10) WEnd
Nine Posted December 4, 2018 Posted December 4, 2018 ControlClick ($GetTitle, "", ....) should work “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) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
unchiusm Posted December 4, 2018 Author Posted December 4, 2018 8 minutes ago, Nine said: ControlClick ($GetTitle, "", ....) should work IT WORKS . Thank you so much @Nine
jdelaney Posted December 4, 2018 Posted December 4, 2018 Use wingethandle. then, even if the title changes, the handle will not. use the handle in all subsequent control functions IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
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