wallstreetsystems Posted October 12, 2011 Share Posted October 12, 2011 I cannot make any of these ControlSetText, ControlSend, WinGetHander to work with our C# developed forms. I am sure my syntax of them are correct because I make them work with the installation automation. AutoIt help mentions that AutoIt might not work well with non-stand windows forms. Is that the reason? But the AutoIt v3 Window Info tool can see the Class, Instance, ClanssnameNN of the forms. And these control functions don't even return anything, They just hang, never return. For example, ControlSetText("LDAP Authentication", "", "[CLASS:WindowsForms10.EDIT.app.0.201d787_r16_ad1;INSTANCE:2]", $loginName, 1) If @error Then MsgBox(4096, "Error", "Count not find the correct control") EndIf Never show any msgbox. Any help? Link to comment Share on other sites More sharing options...
bogQ Posted October 12, 2011 Share Posted October 12, 2011 (edited) ControlSetText dont set @error so there isnt any point of trying to use If @error Then, ControlSetText return 0 if window/control is not found. If Not ControlSetText('.....') Then MsgBox(4096, "Error", "Count not find the correct control") as for WindowsForms10, ControlSend or ControlSetText do work in cases i tested on some fast delivery service app, try only with "[CLASSNN: ]" copy paste form info tool, and try with no win title so itl look something like: ControlSend("", "", "[CLASSNN:WindowsForms10.EDIT.app.0.201d787_r16_ad2]", $loginName), dont forger to check if win is active before using ControlSend. Edited October 12, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
wallstreetsystems Posted October 12, 2011 Author Share Posted October 12, 2011 This give me the msgbox "Control not found": Run("C:\Program Files\Wall Street Systems\Structured Products\WSS.SPF.Admin\WSS.SPF.SPAdmin.exe") WinWaitActive("LDAP Authentication", "") If Not ControlSend ("LDAP Authentication", "", "[CLASSNN::WindowsForms10.EDIT.app.0.201d787_r16_ad13]", $loginUsername ) Then MsgBox(4096, "SetUserName", "Control not found") Else MsgBox(0, "SetUserName", "Control found") EndIf WindowsForms10.EDIT.app.0.201d787_r16_ad13 is the ClassnameNN that AutoIt v3 Window Info tool shows. I tried with empty title string in ControlSend, but same result. Link to comment Share on other sites More sharing options...
bogQ Posted October 12, 2011 Share Posted October 12, 2011 (edited) "[CLASSNN::WindowsForms10.EDIT.app.0.201d787_r16_ad13]" :: change to one : if it down work try with "[iD:]" look at number at info tool Edited October 12, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
wallstreetsystems Posted October 12, 2011 Author Share Posted October 12, 2011 oh, god. Thanks. That works. 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