Jump to content
mircato

Find and obtain text and resend it to a minimized window

Recommended Posts

mircato

Hey guys i was trying to make a simple app the can find text in a minimzed chat window obtain it and resend it 
like -- find copy paste send
as in the picture i wanna obtain the text between the |--> <--|  and paste them in that box then send while the chat window is minimized
but obtain the last |--> <--| because every time it write the word another new one will appear

typing.bmp

Share this post


Link to post
Share on other sites
232showtime

cheating in typing bot??? :lol:


ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post


Link to post
Share on other sites
mircato

cheating in typing bot??? :lol:

NO LOL it's not cheating it's a simple app to help me with typing 
 

Try posting the name of the chat application.

Meanwhile look at ControlGetText and ControlSend to get you started.

Don't be shy to post your efforts here, they will help you to get help.

the application name is palringo and yea mate i know i'll need the ControlGetText and ControlSend but still am a newbie at it :D + i don't know how to obtain the last word to write and how to work on a minimized chat window it's confusing :| and still thanks for answering :)

Edited by mircato

Share this post


Link to post
Share on other sites
BrewManNH

NO LOL it's not cheating it's a simple app to help me with typing 

How is automating a typing app helping you to type? It seems to be the exact opposite of helping you to learn how to type.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
JohnOne

the application name is palringo and yea mate i know i'll need the ControlGetText and ControlSend but still am a newbie at it :D + i don't know how to obtain the last word to write and how to work on a minimized chat window it's confusing :| and still thanks for answering :)

The Control* functions generally work on minimised/background windows.

For getting text, look at _StringBetween


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
mircato

The Control* functions generally work on minimised/background windows.

For getting text, look at _StringBetween

okay mate i'll check and see how it goes

can you provide me with an example !? 

How is automating a typing app helping you to type? It seems to be the exact opposite of helping you to learn how to type.

i know how to type lol or i wouldn't be here now :D the problem is internet sux here in egypt so it always lag when i'm typing with that app i can let it type when it's laggy and when the lag sparks are out i can type myself it's simple as that but the script ain't that simple of course lol

Share this post


Link to post
Share on other sites
mircato

Here's what i managed to do till now :D

#include <MsgBoxConstants.au3>

Example()

Func Example()
    ; Wait 1 second for the Chats - ravenclaw/typing window to appear.
    Local $hWnd = WinWait("[CLASS:Chats - ravenclaw/typing]", "", 1)

    ; Set the edit control in Notepad with some text. The handle returned by WinWait is used for the "title" parameter of ControlSetText.
    ControlSetText($hWnd, "", "SB_CTRL_0062F000", "This is some text")

    ; Retrieve the text of the SB_CTRL_0062F000 control in Chats - ravenclaw/typing. The handle returned by WinWait is used for the "Chats - ravenclaw/typing" parameter of ControlGetText.
    Local $sText = ControlGetText($hWnd, "", "SB_CTRL_0062F000")

    ; Display the text of the SB_CTRL_0062F000 control.
    MsgBox($MB_SYSTEMMODAL, "", "The text in SB_CTRL_0062F000 is: " & $sText)

    ; Wait 1 second for the Chats - ravenclaw/typing window to appear.
    Local $hWnd = WinWait("[CLASS:Chats - ravenclaw/typing]", "", 1)

    ; Send a string of text to the edit control of Edit1. The handle returned by WinWait is used for the "title" parameter of ControlSend.
    ControlSend($hWnd, "", "Edit1", "This is some text")

    Send("{TAB}{ENTER}")
    EndFunc   ;==>Example

 

And here is 2 pictures of the info tool one for the box from which it should obtain the word and the other one is for the box in which it should enter the word and send it

1-Obtain

http://y88i.imgup.net/Obtain8756.jpg

2-Send

http://j47i.imgup.net/Sendcf41.jpg

Edited by mircato
i added the wait window line before the sending line

Share this post


Link to post
Share on other sites
mircato

Look again if that is really the class of the window.

my bad that was the title lol, where to put the title then !?

Share this post


Link to post
Share on other sites
mircato

sorry didn't get it still, i kept trying for like 30 minutes 
should the Local $hWnd = WinWait  be followed by the class or the title
i even tried it as 
 ; Wait 10 seconds for the Chats - ravenclaw/typing window to appear.
    Local $hWnd = WinWait("Chats - ravenclaw/typing")

and 
  Local $hWnd = WinWait("ravenclaw/typing")

still do nothing just a msgbox pop saying the text in SB_CTRL_0062F000 is :

nothing else happens

Share this post


Link to post
Share on other sites
mircato

duh man i give up, i can't understand a thing lol i will just give up on it, sorry for wasting your time tho ^^
n btw palringo doesn't require java you can download the old pc version it's like 1.5mb

Edited by mircato

Share this post


Link to post
Share on other sites
mircato

BUMP lol i tried again and again and still didn't work i didn't want to quit just like that after i spent lots of hours trying lol
if someone is following the thread still and feel like helping :D

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

×