Jump to content

ControlSend()


 Share

Recommended Posts

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?

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...