Sign in to follow this  
Followers 0
tsolrm

ControlSend

12 posts in this topic

ControlSend("Garena", "", "RichEdit20W2", $slash&$banstring&" "&$aLines[$i])

ControlSend("Garena", "", "RichEdit20W2", "{Enter}")

This sends a piece of text into a specified window and presses Enter. In this case it would be "/ban nick 10"

However since the send function simulates key strokes, if a different keyboard layout (Russian for example) is selected it just sends ".ифт тшсл 10"

Is there any way to overcome this problem? Thanks

Share this post


Link to post
Share on other sites



Did you try with ControlSetText ?


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Did you try with ControlSetText ?

I'm not quite sure how that would work out, could you give me a hint?

Share this post


Link to post
Share on other sites

I'm not quite sure how that would work out, could you give me a hint?

Like this

ControlSetText ( "Garena", "", "RichEdit20W2", "/ban nick "& $aLines[$i] )

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Like this

ControlSetText ( "Garena", "", "RichEdit20W2", "/ban nick "& $aLines[$i] )

Thanks I'll give it a go

Share this post


Link to post
Share on other sites

That doesn't really make any difference :)

Share this post


Link to post
Share on other sites

ControlSend("Garena", "", "RichEdit20W2", $slash&$banstring&" "&$aLines[$i])

ControlSend("Garena", "", "RichEdit20W2", "{Enter}")

This sends a piece of text into a specified window and presses Enter. In this case it would be "/ban nick 10"

However since the send function simulates key strokes, if a different keyboard layout (Russian for example) is selected it just sends ".ифт тшсл 10"

Is there any way to overcome this problem? Thanks

read this

Share this post


Link to post
Share on other sites

Lol it has nothing to do with games. It's a script that helps moderators.

Any advice on the subject?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

The script is mented for chat MSNmsg-like win so it dont have anything to do with game

Try

ClipPut("your data")

Send("^v")

or

ControlSend("Garena", "", "RichEdit20W2", "^v")

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

That doesn't always work.

I'm looking for a way to make this

ControlSend("Garena", "", "RichEdit20W2", $slash&$banstring&" "&$aLines[$i])

send only in EN, so how would i change the keyboard layout or the window input to only english letters?

Share this post


Link to post
Share on other sites

Before you make another "doesn't work" reply read this,

Most of the users (at least older ones) test something before posting

As i did test ControlSetText, worked with no problems on 7 different layouts under XP

"^v" no problems

this programs control is not anything special so that simple code line will work different on any other program control.

So if its not working on your testing comp, reinstall comp clean viruses and so on...

You are looking for something that is not there.

If you need layout

_WinAPI_SetKeyboardLayout


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

I also 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

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