Sign in to follow this  
Followers 0
testingtest

Reading a Control

12 posts in this topic

ok I have looked for a few hours and couldn't find what I am looking for.

I need something that can read from say this whole post or just this box

and then import or input it into a gui edit box.

=====

BOX

=====

The reason I need this is to make a automated bot for a chat program as known

as a smart bot.

heres another quick example

CODE
#include <GuiConstants.au3>

$Test = GuiCreate("My Fake Chat Window", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Example = GuiCtrlCreateEdit("hello this is my lame example", 50, 30, 290, 230)

GuiSetState()

While 1

InputBox("Example" , "I Read the Control" , GUICtrlRead($Example))

WEnd

Exit

Share this post


Link to post
Share on other sites



bump... wow that went on the second page pretty fast :whistle:

Share this post


Link to post
Share on other sites

No idea what you are asking really... If you want what the InputBox says, you might give it a variable and read the variable.

If you want to set the data within the edit, GUICtrlRead() + GUICtrlSetData()

If you are reading another application, and want to get the information from that application, you might try ControlGetText().

If none of those are the answer, I truly don't know what you are asking.


[center]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.[/center]

Share this post


Link to post
Share on other sites

No idea what you are asking really... If you want what the InputBox says, you might give it a variable and read the variable.

If you want to set the data within the edit, GUICtrlRead() + GUICtrlSetData()

If you are reading another application, and want to get the information from that application, you might try ControlGetText().

If none of those are the answer, I truly don't know what you are asking.

I want to read from another window such as a chat box window. I don't think control get text will work becuase that reads the controls I am guessing. I just want to read text from a certain area unless control get text reads a edit box then I guess it would work ill look into it tomorrow i am a little tired right now. Thanks for posting

Share this post


Link to post
Share on other sites

I want to read from another window such as a chat box window. I don't think control get text will work becuase that reads the controls I am guessing. I just want to read text from a certain area unless control get text reads a edit box then I guess it would work ill look into it tomorrow i am a little tired right now. Thanks for posting

Is an edit box a control? :whistle:

[center]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.[/center]

Share this post


Link to post
Share on other sites

You better use the Autoit Window Info tool which should have come with your installation of autoit3.

If it doesn't give you a control ID for the control you are trying to read, then you might not be able to get the text from the chat client window.

You might have to hax the TCP line to the chat client with something like WinPCap or some other packet program..

I started on a similar project awhile back. I wanted to make a bot for the chat room at www.maniatv.com. But I got sick of that chat room since then.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

thanks guys i wov you guys :whistle:

[edited]

well I tried it and it didn't work I though it was going to work for sure. Ill explain more the script is for www.buzzen.com which is a chatting site. I am making this for my uncle he loves chatting. The control id I got for the edit box was

73496800 and the class name is known as MSNChatRichEdit42

Edited by testingtest

Share this post


Link to post
Share on other sites

I am still a bit stumped I tried tellng it to put the text in to my message box but it's as if it can't read the control

Share this post


Link to post
Share on other sites

I suspect the control you are trying to read is a control in a IE window. Look at the IE examples, and that should give you some direction.

thanks ill look in to that.

quick question does internet have controls that can be acessed with autoit or is that only for windows.

sorry for being a pain lol

Share this post


Link to post
Share on other sites

The controls is for windows.. if your browsing.. look in the IE examples in your helpfile :whistle:


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

try this...

Dim $input_1

$input_1 = GUICtrlCreateInput ("B123456Z" , 210, 110 , 190 , 20 , -1 )

Send (""&GuiCtrlRead($input_1))

this have to work you only have to make it in a script.

i gues you can do that...

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