Sign in to follow this  
Followers 0
UrS

ControlSend()

12 posts in this topic

Hi,

Why the hell this ControlSend() sends strings with some digits?

For example: I want ControlSend() to send string - "Play Warcraft"

It sends something like this: "23ay Wa32raft"

How to fix this?

Share this post


Link to post
Share on other sites



It is working correctly for me, please show the part of your script with this func :)


Share this post


Link to post
Share on other sites

func RndMsg()
    local $i = Random(0, 6, 1)
    if $Message[$i] = "" Then
        call("RndMsg")
    Else
        if GuiCtrlRead($CheckWC) = "1" Then
            ControlSend("Warcraft III", "", "", $Message[$i], 1)
            ControlSend("Warcraft III", "", "","{ENTER}")
        EndIf
        Sleep(GuiCtrlRead($InputDelay))
    EndIf
endfunc

Here you go.

Share this post


Link to post
Share on other sites

Kind of weird because it is working for me good, what version of AutoIt you have ? Im running it on 3.2.11 . And you are sure that the value of Message[$i] is correctly? Try to make MsgBox(0,"",$Message[$i]) after sending it to the control.


Share this post


Link to post
Share on other sites

I'm using 3.2.10 , and with MsgBox it shows the right message, that I have inputted in.

Can there be any problems, cuz I'm using Vista? or I'm from Russia?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

But you arent sending any Rus chars, then that is not the problem :) hmmm this colud be Vista bug, Try to send all ASCII chars from 30 to 126 make $message like this

Local $message
for $i=30 to 126
$message=$message&chr($i)
next
            ControlSend("Warcraft III", "", "", $Message)

And after sending it post the received string.

Edited by Uriziel01

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

6- $5&'908/-/\012345678964<=>7@A066CDEF071HIJK076MNOPQRSTUVWXYZ[\]-`abcdefghijklmnopqrstuvwxyz|126

6- $5&'908/-/\012345678964<=>7@A066CDEF071HIJK076MNOP081RSTU086WXYZ091\093-`097bcdefghijklmnopqrstuvwxyz|26

Was sending 2 times, you see? :)

btw should the window of a program be opened when using this?

Edited by UrS

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

If Opened = Maximized then NO it dont have to be focused or maximized, but it must exit ;) LoL ! You system have problem only witch B,G,L,[,],a and few more. :) ?!

Hmm, my last Idea is to send like this:

ControlSend("Warcraft III", "", "", chr(066))

What you received now ?

if 066 then I dont have idea how to help you, but if you will receive B char it will be fine :D

Edited by Uriziel01

Share this post


Link to post
Share on other sites

066 ^^

k so it sends ASCII codes instead of normal characters :)

Holy Crap, Ill try to reinstall Auto It3.

Share this post


Link to post
Share on other sites

And maybe you have any xp to test your script on it ? Im in 75-80% that it is Vista problem.


Share this post


Link to post
Share on other sites

Yes, its Vista bug :)

On my friend's XP OS it works perfectly.

Share this post


Link to post
Share on other sites

Ok now alls clear :) Post the bug in bug section of forum if you want.


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