Sign in to follow this  
Followers 0
cainn82

want to make a script thewould get text from screen

16 posts in this topic

I want to make a script that would get text form inside a program and find it on my price list then display the text and the price in the chat box. I can make it display the text in the chat box but getting the text and the price is where im stuck.

Share this post


Link to post
Share on other sites



Use AU3Info.exe to clarify what kind of control contains your text.

Is there a way to find controls in non-autoscript window?


Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Share this post


Link to post
Share on other sites

Do what Zenda said... Use AU3Info.exe to identify the controls in any application window.


[sub]Quantum mechanics: The dreams stuff is made of[/sub]

Share this post


Link to post
Share on other sites

so if i use autoinfo it will tell me what window the text is in then i can program it to get the txt? What i want to do is when some one picks a card i want the script to get the card name find it in my price list then tell the card name and the price for said card. I am completely stumped on how to do this.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Do what Zenda said... Use AU3Info.exe to identify the controls in any application window.

Thanks!

It sort of works... I'm looking at a PuTTY window, and I put the mouse in the "Host Name or IP Address" box. It looks reasonable - says it's Class: Edit, Name Edit1, ID 1044... all probably okay... but for "text" it shows blanks, while in the PuTTY window that box shows the domain name. What am I missing?

EDIT: Never mind... the "text" field there is apparently the CAPTION of the control, not the CONTENT. I used controlgettext with the windowtitle "PuTTY" and control ID "Edit1" and it returned the domain name... so far, so good!

Thanks!!

Edited by longtex

Nobody needs a job. Not much, anyway. Before you need a job, there's a lot of other stuff you need. More or less in order of how badly you need them: AIR, WATER, FOOD, SHELTER, CLOTHING, COMPANIONSHIP, and ACTIVITY. You've been led to believe you need money to "pay" someone else to provide those for you - all but AIR, so far. How long is it going to be before you have to "pay" for AIR, too?

Share this post


Link to post
Share on other sites

so if i use autoinfo it will tell me what window the text is in then i can program it to get the txt? What i want to do is when some one picks a card i want the script to get the card name find it in my price list then tell the card name and the price for said card. I am completely stumped on how to do this.

What exactly is this for? The text on the screen, is it a graphic (ie.. a pic) "text" or is it actually control text?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

no its for magic the gathering online when someone takes a card in a trade it puts the name of the card in txt form at the bottom of the screen in a box called player takes. What i want to do is get that text check it agenst my price list and display a price for the card. then i will program my script to take the amount in tickets and completle the trade.

Share this post


Link to post
Share on other sites

will do the second i get home

Share this post


Link to post
Share on other sites

ok here is the image, I want to get the text at the bottom of the screen where the hard to see arrow is pointing lol.

post-34941-1209079312_thumb.jpg

Share this post


Link to post
Share on other sites

The problem with games is that very few usees standard windows controls, have you checked if AU3Info.exe can see any controls??? If it can't you could use some sort of OCR but that is very tricky.

Share this post


Link to post
Share on other sites

lol i still really new to auto it here is what is in the autoinfo

title Magic Online v3.0.9.2

class WindowsForms10.window.8.app.0.33c0d9d

position 128, 0

size 1024, 766

style 0x160B0000

exstyle 0x00050000

handle 0x000702EA

now it shows this info no matter where i click on the app

Share this post


Link to post
Share on other sites

thanks the ocr will be tough but i will look into learn how to use the ocr

Share this post


Link to post
Share on other sites

I have a question i know in C++ you can tell it something like in winexists at (x,y) then do your code after wards is there something like this in autoit and can this work?

Share this post


Link to post
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
Sign in to follow this  
Followers 0