Jump to content

Is it possible to "grab" and analyse text ?


Guest Garfield
 Share

Recommended Posts

Guest Garfield

Hello,

I need to automate actions depending on a text displayed in a window.

For example, if "YES" is displayed at in a box located at 12,12,100,100, then I have to do action 'A'.

Is it possible with Autoit ? :whistle:

Regards

Link to comment
Share on other sites

Hello,

I need to automate actions depending on a text displayed in a window.

For example, if "YES" is displayed at in a box located at 12,12,100,100, then I have to do action 'A'.

Is it possible with Autoit ?  :whistle:

Regards

<{POST_SNAPBACK}>

Yes Sir. I love this Auto It Stuff. Simple, and well documented. Use STRING commands and IF, THEN, ELSE. Look em up in the great help index, and thank the Creator(s) of Auto It for the fun and adventure. :dance:
Link to comment
Share on other sites

Guest Garfield

Ok so it exists. Impressive. I'm gonna love this software.

So I can grab text and interpret it.

Whatever the font used and whatever the location ?

Does the application need to use standard gadgets or can it just "paint" the text ?

I will still able to interpret it ?

I guess I can simulate clicks giving coordinates, right ?

If my application uses windows inside the window, will it still work ?

A lot of questions but autoit can do what I want, I feel like I will dive into it :whistle:

Link to comment
Share on other sites

For instance, you can select all the text in a window, find out if a "yes" exist no matter what the font size by using the string commands and then execute a program or function. Also get text from a window or control in a window. Several ways to do it..but the fun part is doing it the way it is right for you. The best part is the support. What you are doing, on the face of it, would be fairly simple. Just download it and try it. If you like it, get the Scite editor and all the fixins. Until then, just use notepad for the simple stuff.

:whistle:

Link to comment
Share on other sites

Ok so it exists. Impressive. I'm gonna love this software.

<{POST_SNAPBACK}>

Yes, you will.

So I can grab text and interpret it.

<{POST_SNAPBACK}>

Most of the time; however, there are limits.

Whatever the font used and whatever the location ?

<{POST_SNAPBACK}>

Pretty much.

Does the application need to use standard gadgets or can it just "paint" the text ?

I will still able to interpret it ?

<{POST_SNAPBACK}>

If AutoIt3 cannot "see" what you see as text, then there are "Pixel" functions that reduce an area of a screen down to a number. You can then use that number to make decisions within your script.

I guess I can simulate clicks giving coordinates, right ?

<{POST_SNAPBACK}>

Yes, but try to avoid doing so - there are much better ways to "click" than using the mouse. Read about the "Control" functions within the excellent help file.

If my application uses windows inside the window, will it still work ?

<{POST_SNAPBACK}>

Now it is time for you to tell us if AutoIt will work for you on this application that you have. Assuming that you have downloaded/installed AutoIt version 3, start the AutoIt Window Info tool. Highlight the application window of interest and see what AutoIt "sees" in the info tool. Look under the section marked:

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

If the "YES" that you mention in your first post is shown in that section, then AutoIt3 can "see" that "YES" text.

A lot of questions but autoit can do what I want, I feel like I will dive into it :whistle:

<{POST_SNAPBACK}>

Dive in!

Read the FAQ section of the help file.

Within the help file, go to Contents and open the tree to the Tutorial section.

Read and try at least the first two tutorials.

After that, it is time to get the SciTE editor that has been setup just for writing/checking/debugging/running AutoIt3 code. http://www.autoitscript.com/autoit3/scite/

It is so nice to be able to make a little change to a script and then just hit F5 within SciTE. If I understand the current SciTE setup, it will save your change, run a syntax checking program to see if any mistakes can be found in your code and then your code will run (hopefully)... all by just pressing F5!

Some night - when you cannot sleep - read thru this post:

http://www.autoitscript.com/forum/index.php?showtopic=14395

(copy/paste the code from that post into SciTE and read it from there - it is easier to separate the comments from the code)

[size="1"][font="Arial"].[u].[/u][/font][/size]

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