unchiusm Posted December 4, 2018 Posted December 4, 2018 Hey there everyone , I'm new to the forum . I've been having some fun with AutoIt and I'm trying to use it to make my life a bit easier . I've finished economical and mechanical engineering but I haven't learned much programming in school so I've resorted to youtube and forums. What I am trying to do is automate a software I'm working with but I've run into a couple of hickups. (It's a GPS Monitoring Software). What I'm trying to do is automate a PDF generating process that I have to do for like 100+ vehicles for each day of the month. So far I managed to make it start the program , select the vehicle , the date and hit calculate. The problem is when I hit the calculate button , another window pops up with a name that has the following format "[ Document Type] of [Vehicle Name] , [Starting Date] - [ Ending Date] " . The issue here is when I set the ControlClick control the title name always changes so basically I have to introduce it manually each time I want to do this . Is there anyway for me to automate this? I'll put a screenshot in of the AutoIt v3 Windows . These are the methods I tried that works: ControlClick ("Foaie de parcurs a AR-01079 pt perioada: 01.12.2018 00:00-01.12.2018 23:59" , "" , "WindowsForms10.BUTTON.app.0.33c0d9d8" [ Document Type] of [Vehicle Name] , [Starting Date] - [ Ending Date] Another method that works but it's not optimal at all is : I set a sleep value - The problem with this is that the generating loading time of the file can vary alot. then I set a command to press TAB 8 times until it gets to the Export Button then another send command for Enter. As you can Imagine this is quite ineficient. I have a screenshot atached lower of AutoIT Window Info. Thank you alot!
careca Posted December 4, 2018 Posted December 4, 2018 Go with class instead of title. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
unchiusm Posted December 4, 2018 Author Posted December 4, 2018 3 hours ago, careca said: Go with class instead of title. I tried that too but it didn't work . Maybe I messed something up in the process , I'll try it as soon as I get home . Thank you @careca
Nine Posted December 4, 2018 Posted December 4, 2018 Have you try using [Active] as the title of the window ? “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 Multi-Threading Made Easy
unchiusm Posted December 4, 2018 Author Posted December 4, 2018 4 hours ago, Nine said: Have you try using [Active] as the title of the window ? Not yet , I just got home , gonna fiddle with it now . Thanks alot @Nine
unchiusm Posted December 4, 2018 Author Posted December 4, 2018 11 hours ago, careca said: Go with class instead of title. Doesn't work at all with class . Tried both ways ControlClick ("[CLASS:WindowsForms10.BUTTON.app.0.33c0d9d]" , "" , "WindowsForms10.BUTTON.app.0.33c0d9d8") ControlClick ("WindowsForms10.BUTTON.app.0.33c0d9d]" , "" , "WindowsForms10.BUTTON.app.0.33c0d9d8") It only works if I add the exact title
careca Posted December 4, 2018 Posted December 4, 2018 What if you get the title with the class? Use one to get the other. There are more ways to get what you want, even the window size can be used. See the advanced method of window match. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
unchiusm Posted December 4, 2018 Author Posted December 4, 2018 7 minutes ago, careca said: What if you get the title with the class? Use one to get the other. There are more ways to get what you want, even the window size can be used. See the advanced method of window match. Yes , most likely , but I'm a beginner , basically started using AutoIt 2 days ago . Could you give me a couple example of codes if it's not too much trouble for you. Thank you.
careca Posted December 4, 2018 Posted December 4, 2018 (edited) Active window is a good idea an simpler for now. Consider this $activeW = WinGetTitle('[ACTIVE]') MsgBox(64 + 262144, 'Active Window', $activeW) ControlClick($activeW , "" , "WindowsForms10.BUTTON.app.0.33c0d9d8") Where ACTIVE you could have CLASS:whateverclass Edited December 4, 2018 by careca Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
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