kenneal Posted September 6, 2005 Share Posted September 6, 2005 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? Link to comment Share on other sites More sharing options...
LxP Posted September 6, 2005 Share Posted September 6, 2005 ControlSetText() might be better suited to the job depending on a few different factors. Give it a go and see if it's what you're after. Link to comment Share on other sites More sharing options...
kenneal Posted September 6, 2005 Author Share Posted September 6, 2005 I tried ControlSetText, unfortunately it only changes the title of the window.. Any other solutions as to how to make sure the case doesnt change? Link to comment Share on other sites More sharing options...
LxP Posted September 6, 2005 Share Posted September 6, 2005 You could use ClipPut() to copy the desired text to the clipboard, and then:ControlSend("Kitwork", "", "", "^v")Does that work for you? Link to comment Share on other sites More sharing options...
kenneal Posted September 13, 2005 Author Share Posted September 13, 2005 *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 comment Share on other sites More sharing options...
seandisanti Posted September 13, 2005 Share Posted September 13, 2005 (edited) *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 September 13, 2005 by cameronsdad Link to comment Share on other sites More sharing options...
jpm Posted September 13, 2005 Share Posted September 13, 2005 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 comment Share on other sites More sharing options...
seandisanti Posted September 13, 2005 Share Posted September 13, 2005 There no solution in AutoIt to send characters without interference with the Capslock on/offThe 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 comment Share on other sites More sharing options...
jpm Posted September 13, 2005 Share Posted September 13, 2005 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 comment Share on other sites More sharing options...
seandisanti Posted September 13, 2005 Share Posted September 13, 2005 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. <{POST_SNAPBACK}>i thought it worked because Chr(65) is an uppercase A regardless of the caps lock state... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now