Jump to content

Launching AU3 From VB to complete IE actions?


Recommended Posts

I'm wondering what would be the best/proper way of doing this?

Basically I have a VB program that is managing my Database where the user can view, add, and change Evaluations easily. These changes save to the database. I then must enter all this information into an IE form at a website. I have an AU3 alreadymade up and managing everything currently so the IE portion is complete. Each evaluation has 92 different fields. I don't really care to pass 92 parameters to the AU3 when launching it, etc. I don't really have an idea of where to start with this in order to do it properly. I could maybe pass the Primary Key of the table to the AU3 and it could retrieve all the information and enter it into the ginormous form in IE. Could anybody point me in the right direction or maybe a project where this has been done? At least a theory of how to go about it and some example functionnames to look up? Thanks in advance.

Link to comment
Share on other sites

Why can't you either make it read the database some how by creating your own database reading function, or save the data for each thing to a file, have your autoit program and set it to the proper forms. You say you have the IE portion complete, do you mean you have it so it fills in all 92 elements or what?

Link to comment
Share on other sites

I could maybe pass the Primary Key of the table to the AU3 and it could retrieve all the information and enter it into the ginormous form in IE. Could anybody point me in the right direction or maybe a project where this has been done? At least a theory of how to go about it and some example functionnames to look up?

As Thatsgreat2345 pointed out, having the script just access the database seems the most logical. What kind of database is it? You can search the forum for lots of examples by MySQL, ADO, ODBC, etc.

:)

P.S. Another option, if DB access turns out to be hard, is just to write an intermediate file, like an INI, and just pass the filename as a parameter to the script.

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

It's ADO for now, actually thinking of converting to SQL for easability in VB.

Yes I have a complete working version of the program in autoit as the full database manager and where you can export the Evaluation from the database to IE and it fills in the elements.

Where my thoughts of difficulty come in is if the entry is not successful, I need to let VB know not to mark it as completed for that eval...maybe ammend a field to the DB that AU3 will update saying successful or not. I don't like .ini's so maybe another field in the DB that will be value INSERT ME INTO IE or not and just return a query that will pull that, so that there's no communication between the two...

Better yet I think for speed would be to have 2 tables that have a relationship and have autoit read the smaller table and only pull primary keys from the big table if it appears in the smaller table.

I think that way I could do all communication between VB and AUTOIT in the database via values. Would this be a good solution or would parameters be the way to go? I may have 15 Evaluations that need to be entered and still it may be better to do the communication inside the database instead of passing 1 to 15 parameters to autoit.

That sounds good to me so far, if anyone has any comments and is more knowledgable on speed/relationships please feel free to speak as to what would be the best solution.

Link to comment
Share on other sites

I'm confused here, so you have your VB program doing something and setting stuff to a database. Well can't you set stuff to the database and I'm sure it is quite simple to use autoit and just do an if then statement to check the database. If it does turn out to be an not completed evaluation or whatever then pause or do something that is needed. I'm still quite confused as to why your switching between autoit and VB. As your VB is doing something and then your using Autoit to fill forms in IE. So I think you should keep all the error checking and stuff on the VB side, and simply use Autoit to read the database to put everything into IE. If you check the example scripts people have made a bunch of UDFs for many types of DB's so I'm sure it would be quite easy to integrate into what you need to be done since you don't want to create an intermediate file.

Essentially I'm really confused as to what you want and are trying to achieve since as you've stated you've completed everything on the AutoIt side and seems you are having problems on the VB side.

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