Sign in to follow this  
Followers 0
wallstreetsystems

ControlSetText, ControlSend don't work with customize form?

5 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 

Share this post


Link to post
Share on other sites

oh, god. Thanks. That works.

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