Jump to content
Sign in to follow this  
Juzzz

Read 'windows LIVE messenger' text

Recommended Posts

Juzzz

i spent and hour searching on the forum but nothing that i want.

what AutoIT needs to do.(example)

1. wait till 'someone' talks on msn (so you see a flashing thing on your start bar/task bar (dutch --> startbalk/taakbalk :P)

2. open it

3. read if there is a certain word send (for example "hello")

4. if hello is not sended, close the windows. if hello is sended don't close the window.

i just want AutoIT to look/read/search for a certain word that is sended.

thanks.

Share this post


Link to post
Share on other sites
mrcoffee09

i spent and hour searching on the forum but nothing that i want.

what AutoIT needs to do.(example)

1. wait till 'someone' talks on msn (so you see a flashing thing on your start bar/task bar (dutch --> startbalk/taakbalk :P)

2. open it

3. read if there is a certain word send (for example "hello")

4. if hello is not sended, close the windows. if hello is sended don't close the window.

i just want AutoIT to look/read/search for a certain word that is sended.

thanks.

Look up something called OCR. I'm not quite sure what it stands for, but basically its an algorithm to read text.

Share this post


Link to post
Share on other sites
Juzzz

i foud this code:

$text = WinGetText("Window name", "");get the text from a certain window
MsgBox(0, "Text read was:", $text);just a test to see if it works

i tested on notepad and calculator, not msn yet cause i am at school, but it probebly works :P

with the calc i get all the text, buttons, etc.

now, how do i say that AutoIT need to look for 1 certain word in the whole text (like if you talk to some one you first see his name then the message)

Share this post


Link to post
Share on other sites
Juzzz

I've tried something like that to to try and encrypt it.

But I hit a wall as I coulden't figure out how to access the window.

Maybe OCR is really the best solution...

i never heard of OCR.. can you give me an example/tutorial or something?

after my search it looks like an other scripting language?

can't it really be done in autoit?

ps. what is the problem?, why can you read text from notepad and even the calculator and not an msn messenger window?

Share this post


Link to post
Share on other sites
Triblade

You really have to work on your searching skills.

http://en.wikipedia.org/wiki/Optical_character_recognition

OCR is simply the recognition of characters via 'optical' search patterns.

So, like do a pixel search on some picture and try to match it to known letters and other characters.

(For example: http://www.autoitscript.com/forum/index.ph...608&hl=ocr)

And MSN uses a special way to display that window. It's sort of hidden. I think it not really a normal window, but some kind of weird popup of the main window.

Only my 2 cents though.


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

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

Share this post


Link to post
Share on other sites
Juzzz

so if i understand it right, OCR is a funtion where he sees the window as a picture.

on the picture he try to recognise characters?

now.. how do i use it..

when i am home iam going to test your example and try to understand the code :P

is it maybe an posibility to alt+print screen the msn window and go from that?

ps sorry about my bad search about 'OCR' had a typo xD

Share this post


Link to post
Share on other sites
torels

http://mess.be

go in the forums

you need the control id (it is written in a dll in the "windows live\messenger\" directory... you can find the dll's name on the forums and then open it with reshacker to get the id). You can then get the text with _SendMessage() function but you will have to mess a bit with it...

cheers! :P


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites
torels

exactly

take a look here to understand what I am talking about http://www.autoitscript.com/forum/index.ph...ersonal+message

btw... the above mentioned dll is msgres.dll, in the same directory as the windows live messenger exe's one

cheers


Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org

Share this post


Link to post
Share on other sites
Juzzz

exactly

take a look here to understand what I am talking about http://www.autoitscript.com/forum/index.ph...ersonal+message

btw... the above mentioned dll is msgres.dll, in the same directory as the windows live messenger exe's one

cheers

hehe this is hard... ( i am a bit new to AutoIT)

i dunno where to find in the dll i searched on 'control id' and found 2 results:

<TabControl id=atom(idContentTabs) layout=borderlayout()>

and:

<TabControl ID=Atom(idTab) LayoutPos=Client BorderThickness=Rect(1,1,1,1) Alpha=204 Layout=BorderLayout()>

but my feeling says that thats not the right one :P

is the control id always the same or different on every computer?

+ how does msn separate the different msn windows.

Share this post


Link to post
Share on other sites
ACS

Just to clear things up--

OCR is not applicable in this case. OCR is used when you have an image on the computer and you need to extract the text from it. For example, if you scan in a page from a book, you pass the image through OCR software which will pick out text from the image.

This is not what you want. What you want is to extract the text directly from the control.

For "regular" Windows apps this is easy since most use the Edit or Textbox controls which have standard methods of accessing the text. However I noticed the MSN uses custom classes, mainly for security purposes, to prevent access to the text inside. This is why standard password-revealers cannot grab the password from the main MSN login window.

So the short answer is, I don't think it's possible...

Share this post


Link to post
Share on other sites
Juzzz

Just to clear things up--

OCR is not applicable in this case. OCR is used when you have an image on the computer and you need to extract the text from it. For example, if you scan in a page from a book, you pass the image through OCR software which will pick out text from the image.

This is not what you want. What you want is to extract the text directly from the control.

For "regular" Windows apps this is easy since most use the Edit or Textbox controls which have standard methods of accessing the text. However I noticed the MSN uses custom classes, mainly for security purposes, to prevent access to the text inside. This is why standard password-revealers cannot grab the password from the main MSN login window.

So the short answer is, I don't think it's possible...

everything is possible, like you sead "standard password-revealers cannot grab...." so we don't need to make an standard code.

we need to go around and think out side the box :unsure:

we can adjust the code later but now maybe a possibility is to make an screenshot from the msn text window and make a picture of it.

then use OCR to exstact the text, compair the text and its done for the first beta :P

or you got an other solution?

Share this post


Link to post
Share on other sites
ACS

everything is possible, like you sead "standard password-revealers cannot grab...." so we don't need to make an standard code.

we need to go around and think out side the box :D

we can adjust the code later but now maybe a possibility is to make an screenshot from the msn text window and make a picture of it.

then use OCR to exstact the text, compair the text and its done for the first beta :unsure:

or you got an other solution?

Hmm, yes I suppose you're right, anything IS possible. :P

What I SHOULD have said was it's possible, but won't be very easy. :D

Share this post


Link to post
Share on other sites
Bert

everything is possible, like you sead "standard password-revealers cannot grab...." so we don't need to make an standard code.

we need to go around and think out side the box :unsure:

we can adjust the code later but now maybe a possibility is to make an screenshot from the msn text window and make a picture of it.

then use OCR to exstact the text, compair the text and its done for the first beta :P

or you got an other solution?

Have you tried something simple like cut and paste to see if you can grab it? If you can, then do that as a work around until you find a better solution.

Share this post


Link to post
Share on other sites
Juzzz

ok i did some testing, i am new to AutoIT so did not knew everything but i am sure you guys will help me :P

i created this code for test:

;note:  you need to have msn history on and have some hostory
;       now its looks for the last writen in history
$name = "Juzzz";msn windows name

        WinWaitActive($name)
    WinSetState($name, "", @SW_MAXIMIZE);set the msn windows maximized so that the coordinates are the same
    MouseClick( "primary", 19, 313);click right before the last line
    send("^C");copy the text
    $clip = ClipGet()
    if $clip == "hello" then;looks if its the right word
        MsgBox(0, "worked", $clip)
    Else
;need to go on search for the right window
    EndIf

the few problems are:

- if hello is written he does not give the msgbox

- he has to go on if the word is NOT right

- looks if there is a new window in the taskbar not an active window (but for testing its OK)

- the Y place is different sometimes depends on the history

many thanks again

Edited by Juzzz

Share this post


Link to post
Share on other sites
Triblade

I didn't tried it, but you click primary with the mouse and then perform a ctrl-c.

But if i'm right, you didn't select any text. So there shoud be nothing in the clipboard.


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

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

Share this post


Link to post
Share on other sites
Juzzz

I didn't tried it, but you click primary with the mouse and then perform a ctrl-c.

But if i'm right, you didn't select any text. So there shoud be nothing in the clipboard.

i discovered that if you click right before the text (there is a empty please there) then you select the whole line.

i tested it without the IF so it just give me an msgbox from the clipboard and that worked.

Share this post


Link to post
Share on other sites
Juzzz

and one = sign?

i now i am new to AutoIT but i quote out of the help file:

= Assignment. e.g. $var = 5 (assigns the number 5 to $var)

== Tests if two values are equal (case sensitive if used with strings)

so whats the problem..

but i am stuck now so please help me further

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  

×