Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Most efficient way to script to automate a long process?

$
0
0
Complete Autoit newbie here. I was recommended by a friend to try using Autoit, which is why I'm here.

I'm on a personal project of sorts and have run into the need for a script that can perform the following tasks in a windows (xp) based environment.

PART 1

Obtaining info from database
Steps are:

0) run a program, and click on a certain option in a dropdown bar in the main window program
1) fill in a pre determined value in the resulting dialog box
2) click next
3) fill in different values in another dialog box (each different value corresponds to the first value filled in in 1)
4) click next
5) check a checkbox (the checkbox results in an export to excel)
6) press 'preview'
7) press save to, enter a specific location on the computer, enter a specific file name, and hit save
8) repeat with different,pre-determined values in step 1.


Then open the exported file(s) resulting from the above process in excel. There will be 8 different ones (since there are 8 different values to be filled in in step 1).

PART 2

In part 1, values in the exported files are listed in different rows under different labels. For example, it would be 'Animals' in one cell, and '2' in the corresponding cell next to it.

Here, I need to obtain the total of all the numerical values in cells next to cells labelled the same

-These totals are listed in a worksheet of a completely separate excel file (separate from the previous 8 in part 1) For simplicity's sake I will refer to this final file as the 'summary file'. I will refer to the 8 different files from part 1 as 'source files', also for simplicity.

So the source files essentially look something like:
Legend: Cell A / Cell B

SOURCE FILE 1:
Animal / 1
Animal / 2
Animal / 3
Seafood / 5
Seafood / 4
Seafood / 5
Grass / 8

SOURCE FILE 2
Lego / 3
Lego / 5
Bark / 8
Bark / 9
King / 3

A characteristic of the source files: There are no overlapping categories in each source file, i.e 'lego' will not appear in file 1 (or any other source file for that matter) and 'animals' will not appear in file 2 (or any other source files)

The thing is, 'animal' cannot be listed as 'animal' in the summary file. They must be listed as codes in the eventual file. The codes for each category for example look like:

Legend: Category / code
Animal / ANI001
Seafood / SEA002
Grass / GRA003
Lego / LEG004
Bark / BAR005
King / KIN006

{The codes are listed alongside their corresponding categories in the 'code file' (again named for simplicity's sake) which is also an excel file.}


The final summary file is also not in numerical order and have no clear pattern to them. Thus, the summary file will something like this:

Code / total
ANI001 / 6
SEA002 / 9
BAR005 / 17
GRA003 / 8
KIN006 / 3
LEG004 / 8


I thought of the following solution, but am looking for a simpler and more concise way (that preferably does not require pasting and deleting codes)

Spoiler

Essentially, I am looking for the:
Most efficient way to script parts 1 and 2
Best and most efficient way to carry out the whole process (including the excel part)
How to run the script

Does anyone know of tutorials or useful resources that I can use to get started in this? straight instructions would do too, I have no idea where to begin so any help is appreciated.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>