1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Feb 2013
    Rep Power

    Most efficient way to script to automate a long process?

    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

    Animal / 1
    Animal / 2
    Animal / 3
    Seafood / 5
    Seafood / 4
    Seafood / 5
    Grass / 8

    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)


    Create a script that will carry out the following actions in the summary file:

    -Paste a column of the codes (GRA003, etc) to one empty row
    -do an =SUMIF and paste a column of corresponding totals from each category to the row next to its corresponding code
    -these two columns will constitute a table and must be placed in an empty area of the worksheet

    Create a script to paste the exact number totals (cannot use excel's =IF function since that just pastes cell locations, i want the exact numerical value) in the table to the column next to the corresponding relevant codes in the final excel file.

    I have no idea how to write such a script either, though, so help with that or relevant resources would be very appreciated.[/spoiler]

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

    Does anyone know of tutorials or useful resources that I can use to get started in this? I have no idea where to begin.
  2. #2
  3. ASP Hero (2000 - 2499 posts)

    Join Date
    Jun 2006
    New Springfield, OH
    Rep Power
    Wow. All of these things can be done in VBScript. However, it will be nearly impossible to script them reliably. I would like to help you out, but the script would probably need to be written on the machine that it will run on. This is really a lot more detailed than what scripting automation is intended for. It might be quite difficult to accomplish.
    Don't like me? Click it.

    Scripting problems? Windows questions? Ask the Windows Guru!

    Stay up to date with all of my latest content. Follow me on Twitter!

    Help us help you! Post your exact error message with these easy tips!!

Similar Threads

  1. Script to automate this task
    By praveen.kumar in forum Programming Help
    Replies: 0
    Last Post: February 15th, 2009, 11:47 PM
  2. Automate process of randomly selecting things?
    By jashan17 in forum Windows Scripting
    Replies: 1
    Last Post: November 3rd, 2007, 05:14 AM
  3. How to automate ASP script
    By acastro in forum ASP Development
    Replies: 1
    Last Post: June 25th, 2006, 02:22 PM
  4. Stopping a long server process
    By calgarychinese in forum ASP Development
    Replies: 10
    Last Post: July 12th, 2005, 03:36 PM
  5. Automate ASP page / script
    By baroned in forum HTML, JavaScript And CSS Help
    Replies: 1
    Last Post: March 15th, 2004, 12:19 PM

IMN logo majestic logo threadwatch logo seochat tools logo