Guest Garfield Posted August 11, 2005 Share Posted August 11, 2005 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 ? Regards Link to comment Share on other sites More sharing options...
slipperylobster Posted August 11, 2005 Share Posted August 11, 2005 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 ? 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. Link to comment Share on other sites More sharing options...
VicTT Posted August 11, 2005 Share Posted August 11, 2005 Yea it's possible..do a WinGetText on the window..and check if you get "YES" ..If you hand me the details, I might make you a script Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
Guest Garfield Posted August 12, 2005 Share Posted August 12, 2005 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 Link to comment Share on other sites More sharing options...
slipperylobster Posted August 12, 2005 Share Posted August 12, 2005 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. Link to comment Share on other sites More sharing options...
herewasplato Posted August 13, 2005 Share Posted August 13, 2005 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 <{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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now