xoail Posted March 8, 2018 Share Posted March 8, 2018 I am trying to send text to a textbox on an application by point my cursor at it (ensuring it is active) but unfortunately it does not work. Other apps such as Notepad and Word do not have any problem? Very simple test code: AutoItX3 auto = new AutoItX3(); Thread.Sleep(3000);//allows me to point my cursor at desired text field auto.Send("Test sending text"); //works on all apps except 1 program The Window and Control info is as follows: expandcollapse popup>>>> Window <<<< Title: Edit Email Message Class: WindowsForms10.Window.8.app.0.141b42a_r9_ad1 Position: 345, 96 Size: 990, 735 Style: 0x16CF0000 ExStyle: 0x00050100 Handle: 0x00030606 >>>> Control <<<< Class: WindowsForms10.RichEdit20W.app.0.141b42a_r9_ad1 Instance: 7 ClassnameNN: WindowsForms10.RichEdit20W.app.0.141b42a_r9_ad17 Name: Advanced (Class): [CLASS:WindowsForms10.RichEdit20W.app.0.141b42a_r9_ad1; INSTANCE:7] ID: 329328 Text: Position: 278, 194 Size: 682, 459 ControlClick Coords: 469, 214 Style: 0x56010044 ExStyle: 0x00000200 Handle: 0x00050670 >>>> Mouse <<<< Position: 1100, 535 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Edit Insert Delete &Add E-mail Autograph Delete Save Edit Insert Delete &Add E-mail Template &Send &Cancel BCC: CC: Neither Sent/Received: Attach... Unsent Date / Time: From: To: Subject: I've also tried using ControlSend and still no luck. How can I troubleshoot this? Link to comment Share on other sites More sharing options...
Earthshine Posted March 8, 2018 Share Posted March 8, 2018 (edited) what application are you trying to automate? Outlook? post pics of the Info Tool, each tab. this means next to nothing. it's ironic, reading this thread's title, '...A SPECIFIC APPLICATION', yet the specific application was not mentioned.... lol Edited March 8, 2018 by Earthshine Danp2 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Earthshine Posted March 8, 2018 Share Posted March 8, 2018 (edited) snipped, wrong thread. Edited March 8, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
xoail Posted March 8, 2018 Author Share Posted March 8, 2018 Hi, thanks for the reply. The app is our internal Email client (developed by another company, hence we don't have the source to know much about how it was built). I am looking to automate few things by using AutoIt and C#. I must say that if I use Send("Test sending text", 1); with flag it does work. Is there a reason why it wouldn't for Send("Test sending text")? Link to comment Share on other sites More sharing options...
Earthshine Posted March 8, 2018 Share Posted March 8, 2018 (edited) your best bet is to use the IUIAutomation stuff in FAQ 31. use simplespy to get a code and property dump and use the wrapper to set text, setText is part of UI_Action (beware, this is not for newbies). If the developers did not use or expose their controls to automation then Send is all you can really do. download here: UIA_V0_64.zip, EXAMPLES_V0_64.zip Edited March 8, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now