Jump to content

Recommended Posts

Posted

Hi all mates,

despite all the programs around i'm trying to build my one after studying a lot AutoIt.

I have all the calculating procedures done. Mainly what i want to do is merely a suggestion on what to do at opening hand once given the cards.

Cards are written on the chat box.

I can access it trough

$Chat_Window_handle  = ControlGetHandle("[CLASS:PTIODEVICE]", "", "Internet Explorer_Server1")

but i can't find the way to read the text inside.

Someone (yes i used the search button...) answered to use _IEAttach but to be honest i tried but without luck...

$Chat = _IEAttach ($Chat_Window_handle, "HWND")
msgbox(0,"...",$Chat) but i get nothing.

Can please someone explain me how to manage it?

Thanks all!

Posted

In the helpfile under the UDF's there are these two functions:

#include <IE.au3>

_IEBodyReadHTML ( ByRef $o_object )

And

_IEBodyReadText ( ByRef $o_object )

These are probably the functions you are looking for if you want to read the text from a webpage.

Example in helpfile:

; *******************************************************

; Example 1 - Open a browser with the basic example, read the body Text

; (the content with all HTML tags removed) and display it in a MsgBox

; *******************************************************

;

#include <IE.au3>

$oIE = _IE_Example ("basic")

$sText = _IEBodyReadText ($oIE)

MsgBox(0, "Body Text", $sText)

My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Posted

But the chat window is defined as:

>>>> Window <<<<
Title:  $100 Beginners Freeroll - 30/60 - 191375803
Class:  PTIODEVICE
Position:   793, 111
Size:   806, 626
Style:  0x16CA0000
ExStyle:    0x00000100
Handle: 0x00100814

>>>> Control <<<<
Class:  Internet Explorer_Server
Instance:   3
ClassnameNN:    Internet Explorer_Server3
ID: 
Text:   
Position:   3, 470
Size:   229, 94
ControlClick Coords:    180, 45
Style:  0x56000000
ExStyle:    0x00000000
Handle: 0x00380A3A

>>>> Mouse <<<<
Position:   186, 538
Cursor ID:  2
Color:  0xD7E8F8

>>>> StatusBar <<<<

>>>> Visible Text <<<<

So i can't use that way.

Anyone can suggest a way to get it solved?

Thanks,

M.

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
×
×
  • Create New...