Sign in to follow this  
Followers 0
MrBot

small problem with controlsend

19 posts in this topic

i want to use controlsend to send for game(so it's like flash without id)

i tryed

controlsend("game","",0,"what i want")

it's work :party: but when i send small and cap letters

it's make it random :)

ex : i maked code

ControlSend("Game","",0, "This is Some Text")

it some time send it "THIs some text" and some time "this is some text" and some times "this is SOME TEXT" ,etc

i need to solve for this problems plz cuze what i want to send when change form cap to small it's give me error in the game

Share this post


Link to post
Share on other sites



ControlSetText()

^Always works better when dealing with text.


[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

controlsettext will change the name of game to the new text

u didn't understand me

for games u have to make the id 0 to work

so if i used controlsettext it will change the game name

Edited by MrBot

Share this post


Link to post
Share on other sites

Make a snippet of the code and post it.


[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites

$shsro = WinGetHandle("Game")
        $C0DE= FILEOPEN(@WORKINGDIR& "\code.txt",0)
        $CAPTCHA= FILEREADLINE($C0DE)
        FileClose($C0DE)
        controlsend($shsro,"",0,$CAPTCHA)

that simple from my code

sry for my bad english

Share this post


Link to post
Share on other sites

try sending it in raw mode

$shsro = WinGetHandle("Game")
        $C0DE= FILEOPEN(@WORKINGDIR& "\code.txt",0)
        $CAPTCHA= FILEREADLINE($C0DE)
        FileClose($C0DE)
        controlsend($shsro,"",0,$CAPTCHA,1);<----flag for raw mode 
        ;flag = 0 (default), Text contains special characters like + to indicate SHIFT and {LEFT} to indicate left arrow.
        ;flag = 1, keys are sent raw.

[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites

try sending it in raw mode

$shsro = WinGetHandle("Game")
        $C0DE= FILEOPEN(@WORKINGDIR& "\code.txt",0)
        $CAPTCHA= FILEREADLINE($C0DE)
        FileClose($C0DE)
        controlsend($shsro,"",0,$CAPTCHA,1);<----flag for raw mode 
        ;flag = 0 (default), Text contains special characters like + to indicate SHIFT and {LEFT} to indicate left arrow.
        ;flag = 1, keys are sent raw.
same problem

it changed "C5n3G5" to "C%N#G5"

random change :)

Share this post


Link to post
Share on other sites

it might be just the game augmenting things try this

controlsend($shsro,"",0,"{T}his is {S}ome {T}ext",0);<----flag
        ;flag = 0 (default), Text contains special characters like + to indicate SHIFT and {LEFT} to indicate left arrow.
        ;flag = 1, keys are sent raw.

[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites

that's what happen :

"{T}is iS {s]omE {t]ext"

i will made from this code ^^

Share this post


Link to post
Share on other sites

#include <string.au3>
        $shsro = WinGetHandle("Game")
        $C0DE= FILEOPEN(@WORKINGDIR& "\code.txt",0)
        $CAPTCHA= FILEREADLINE($C0DE)
        FileClose($C0DE)
        $HS = _StringToHex($CAPTCHA)
        controlsend($shsro,"",0,$HS)
        
        ;Just check what it likes, its going to come down to how much do really need this?
        ;Maybe it likes Binary? try StringToBinary and sending the Binary variable. I cant test it
        ;because I dont have the game or I would.


[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

controlsend($shsro,"",0,"{T}his is {S}ome {T}ext",0);<----flag
        ;flag = 0 (default), Text contains special characters like + to indicate SHIFT and {LEFT} to indicate left arrow.
        ;flag = 1, keys are sent raw.ƒoÝŠ÷ Ûú®¢×ªº‹^©ž
Edited by MrBot

Share this post


Link to post
Share on other sites

and aother small thing fun send is work so the my code don't have problems

but i need to send when the game minimized i search and search for this

i'm really need it

Share this post


Link to post
Share on other sites

plz any 1 help me

i want to make this script fast plz

Share this post


Link to post
Share on other sites

I have seen this problem myself when it comes to send. I've never been able to nail it down, but what I have done as a work around is to do a control read to check to see if what I sent was correct. If it was sent wrong, I would resend it. As what was said earlier, controlsend works best.

Share this post


Link to post
Share on other sites

it send but the problem it's make cap and small random

Share this post


Link to post
Share on other sites

I had this exact same problem recently.

Got round it like this:

put this at the top of your script:

Opt("SendCapslockMode",0)

This prevents AutoIt messing with caps lock when trying to send data.

You will then need to send your own caps lock commands:

e.g. to send "Hello There" will be

Send("{CAPSLOCK on}")
ControlSend($hWND,"","","h")
Send("{CAPSLOCK off}")
ControlSend($hWND,"","","ello")
Send("{CAPSLOCK on}")
ControlSend($hWND,"","","t")
Send("{CAPSLOCK off}")
ControlSend($hWND,"","","here")

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

Share this post


Link to post
Share on other sites

I had this exact same problem recently.

Got round it like this:

put this at the top of your script:

Opt("SendCapslockMode",0)

This prevents AutoIt messing with caps lock when trying to send data.

You will then need to send your own caps lock commands:

e.g. to send "Hello There" will be

Send("{CAPSLOCK on}")
ControlSend($hWND,"","","h")
Send("{CAPSLOCK off}")
ControlSend($hWND,"","","ello")
Send("{CAPSLOCK on}")
ControlSend($hWND,"","","t")
Send("{CAPSLOCK off}")
ControlSend($hWND,"","","here")
lol so how i will make it read from file ^^

Share this post


Link to post
Share on other sites

can any 1 help plzzzzzzzzzzz :):party::idea:

Share this post


Link to post
Share on other sites

plz any 1 help i need to make this program plzzzzzzzzzzzzzzzzzzzz

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