Jump to content

Reading a Control


Recommended Posts

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

Link to comment
Share on other sites

  • Moderators

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.

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.

Link to comment
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

Link to comment
Share on other sites

  • Moderators

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:

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.

Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
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

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