Sign in to follow this  
Followers 0
Floppy

Edit the controls of a window

12 posts in this topic

Hi, sorry for my bad english, but I'm italian.

I would write a program that edit a control on the Windows Live Messenger window. I'm tried to use the AutoIt Window Info too, but it select all window...How can I do?

thanks in advance

Share this post


Link to post
Share on other sites



If you're not able to get the information you need from the AutoIt Window Info tool, try looking at the output of WinGetClassList.


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

You probably want the ControlCommand function.

Also look at ControlGetHandle to get a Control Handle to control you want to edit.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

I want to change the content of the control...I wrote this script...

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.12.1
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

#include <GuiConstants.au3>

$win_title="Windows Live Messenger"
WinWaitActive($win_title)
$handle=ControlGetHandle($win_title,"","Edit1")
ControlSend($win_title,"",$handle,"Test")

...but it renames the "Find contact" fileld...instead I want to edit the UserName and the Personal Message fields. thank you

Share this post


Link to post
Share on other sites

Looks like Edit1 isn't the right field. You can try Edit2, 3, etc...

See if ControlGetFocus is able to identify it for you.


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

I'm replaced the "Edit1" with other numbers ("Edit2","Edit3",ecc.) but it still renames the "Find contact" fileld...

Share this post


Link to post
Share on other sites

This won't work, i think:

$handle=ControlGetHandle($win_title,"","Edit1")
ControlSend($win_title,"",$handle,"Test")

you should better use

$ClassNN="Edit1"
ControlSend($win_title,"",$ClassNN,"Test")

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

This won't work, i think:

$handle=ControlGetHandle($win_title,"","Edit1")
ControlSend($win_title,"",$handle,"Test")

you should better use

$ClassNN="Edit1"
ControlSend($win_title,"",$ClassNN,"Test")
Doesn't work... Edited by FSoft

Share this post


Link to post
Share on other sites

Try this:

ControlFocus($win_title,"","Edit1")
ControlSetText($win_title,"","Edit1","Test")
Sorry, but doesn't work...

Share this post


Link to post
Share on other sites

again i was running on to the same problem and no one knew the solution but after 4 days of googlin

1- windows live messenger uses windowless controls.

2- windowless controls do not get registered in windows when created cos they draw them selves.

3- u will never be able to get the windowless control handle in anyway

4- ur only chance is the COM objects to get what u want

5- or u can start reading about accessibility

btw im working on a msg notifier so if anyone have any idea about the live objects u can help meh

GL

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  
Followers 0