Jump to content

Read/write flat data file & imagerecognition


Recommended Posts

I am a rookie to AI!

I am trying to find out how to get AI to recognize buttons in programs, where no field name can be retrieved. I thought it might be possible to recognize an image (icon) in an active window even if it changes position dynamically. But where to learn about how to do it?

I also have tried to learn to pass a series of data to a file and retrieve it again in the same variables. But I did not understand the wiki or helpfiles on that one. Can anyone help?

/Lars

Edited by LPMathiasen

/Lars

Denmark

www.lpmathiasen.com

Automation and simplification is my game!

Link to comment
Share on other sites

Use the AutoIT window info tool...move the targeter over one of the controls, and send back the control tab's output...send that back to us

also, look into all the functions starting with Window*, and Control* (helpfile)

The flat files can be read in with the _File* or File* functions (again in the helpfile)...and there are pleanty of ways to parse the lines for their data points using String* functions.

Post what you come up with, and someone will help with your issues.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

In regard to controls - Please see this video. As you can see, is it impossible  to get the names or text of the individual controls, only the group it is in. I can use shortcuts for some, but not the tabs or the tree. So I assumed some way of graphics capture or similar is available. I might go about this the wrong way, but as a newbie please bear with me. Please advise me how to navigate this program with AI. :-)
 
 
As for files. Please help in regard to this. 
 
Universalist wrote quote: "and there are plenty of ways to parse the lines for their data points using String* functions."
 
It is this exact area I seem to fail to comprehend. Please give a simple example of passing variables to and from files. 
/Lars

/Lars

Denmark

www.lpmathiasen.com

Automation and simplification is my game!

Link to comment
Share on other sites

look into:

_GUICtrlTreeView* functions...tons of them for manipulation

basically, whatever the control class, replace with the bold item to manipulate:

 

_GUICtrlTreeView*

Use the Control* functions to grab the handles needed to use those functions

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Thanks a lot. It seems rather complex, but I'll try it. So far AI has been easy enough to master,

How about the latter question?

 

Universalist wrote quote: "and there are plenty of ways to parse the lines for their data points using String* functions."
 
It is this exact area I seem to fail to comprehend. Please give a simple example of passing variables to and from files. 
 

 

 

I know it seems trivial to more experienced users but it is a showstopper to me :-(

/Lars

/Lars

Denmark

www.lpmathiasen.com

Automation and simplification is my game!

Link to comment
Share on other sites

Ok.

Because I'm no programmer I am not 100% sure about what to give you, but I'll try.

Hereunder is what I have in mind to do. It is only the part about parsing variables to and from a file I can't get my mind around. By that I mean, it is easy enough to pass a string of misc variables to a file, but how to do it so I can retrieve them again I flunk totally about....

The first AI program produces these variables to be parsed to file:

Check if file is empty
    if not then clear all data
Else write $Company, $Address, $Zip, $Main to file

The second program retrieves the data and add them to a database by copying the variables to a Windows form. It is here my problems shows.

Check if file is empty
if empty warn
if not then  get all data $Company, $Address, $Zip, $Main from file and pass them to $Company, $Address, $Zip, $Main

code
code
code

When data is used open file and clear it

Is this usable?

How the file is formatted - I woulden't know.

 

/Lars

 

 

Edited by LPMathiasen

/Lars

Denmark

www.lpmathiasen.com

Automation and simplification is my game!

Link to comment
Share on other sites

I would need a small example of a flat file to give you a reproducible script.

 

The file I guess woud be structured like one line like: Company, Address, Zip, Main

/Lars

Denmark

www.lpmathiasen.com

Automation and simplification is my game!

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