Jump to content

Case problem in ControlSend()


Recommended Posts

I've been using Controlsend for multi tasking purposes such as when I am surfing the internet I use it to do some other stuff.

Controlsend("Kitwork", "", "", "Etc etc: "& $ctext &" {enter}")

But sometimes i realise my $ctext is for e.g. - Hi how are you doing - ?

It appears sometimes as:

hI hOw aRe yOu DoinG - /

Hi HoW ARE yoU doInG _ ?

Hi hoW ARE yoU DoinG - ?

(as if the shift button was triggered..)

While there appears to be no missing letters at the moment, is there any way to fix it?

:whistle:

Link to post
Share on other sites

*bump*

Nope that doesnt work. Oddly enough, does anybody have any sort of solution for this? I really need to differentiate case letters.

As for the method you just suggested,

it just appears as "v" there. I've copied your syntax just to double check, and its still the same thing.

Please help ;)

Link to post
Share on other sites

*bump*

Nope that doesnt work. Oddly enough, does anybody have any sort of solution for this? I really need to differentiate case letters.

As for the method you just suggested,

it just appears as "v" there. I've copied your syntax just to double check, and its still the same thing.

Please helpĀ  ;)

<{POST_SNAPBACK}>

i've got an idea that will make it work, give me a few minutes and i'll add the code to this post....

***edit*** try this code...

$thestring = "Hi how are you?"
$theletters = StringSplit($thestring,"")
for $x = 1 to $theletters[0]
     Send(Chr(Asc($theletters[$x])))
 Next
Edited by cameronsdad
Link to post
Share on other sites

There no solution in AutoIt to send characters without interference with the Capslock on/off

The only possibility is to minimize the delay between keystroke using Opt('sendkeydelay',0) and Opt('SendKeyDownDelay',0) :">

Opt("SendKeyDelay", 250)
Run("Notepad")
WinWaitActive("Untitled -")
$cText="Hi how are you doing - ?"

Controlsend("Untitled -", "", "Edit1", "Etc etc: "& $ctext &" {enter}")
Sleep(2000)

Opt("SendKeyDelay", 0)
Opt("SendKeyDownDelay", 0)
Controlsend("Untitled -", "", "Edit1", "Etc etc: "& $ctext &" {enter}")
Link to post
Share on other sites

There no solution in AutoIt to send characters without interference with the Capslock on/off

The only possibility is to minimize the delay between keystroke using Opt('sendkeydelay',0) and Opt('SendKeyDownDelay',0) :">

Opt("SendKeyDelay", 250)
Run("Notepad")
WinWaitActive("Untitled -")
$cText="Hi how are you doing - ?"

Controlsend("Untitled -", "", "Edit1", "Etc etc: "& $ctext &" {enter}")
Sleep(2000)

Opt("SendKeyDelay", 0)
Opt("SendKeyDownDelay", 0)
Controlsend("Untitled -", "", "Edit1", "Etc etc: "& $ctext &" {enter}")

<{POST_SNAPBACK}>

actually, the method i listed works regardless of capslock since it is explicity sending the characters intended....i've tested it a few times (the modified that i just updated)
Link to post
Share on other sites

actually, the method i listed works regardless of capslock since it is explicity sending the characters intended....i've tested it a few times (the modified that i just updated)

<{POST_SNAPBACK}>

Your method can work just because that your sending one chareacter at a time just because AutoIt reset the capslock state a the end of the send so you have very few chance to be in conflict with an external keystroking of the capslock button.

;)

Link to post
Share on other sites

Your method can work just because that your sending one chareacter at a time just because AutoIt reset the capslock state a the end of the send so you have very few chance to be in conflict with an external keystroking of the capslock button.

:P

<{POST_SNAPBACK}>

i thought it worked because Chr(65) is an uppercase A regardless of the caps lock state... ;)
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...