Jump to content

New to AutoIT , trying to automate a process.


 Share

Recommended Posts

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!

Screenshot_2.png

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...