Jump to content

Find and obtain text and resend it to a minimized window


Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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