J-F Posted June 13, 2006 Posted June 13, 2006 Hi I had a little problem and I was wondering if it happend to you in the past. From time to time, when I run a script, AutoIt doesn't type the proper keys. For Exemple if I say to Autoit to execute the following command : Run ("C:\Program files\"), Au3 will type C:|Program files| . It happens like less than 5% of the time I decide to run a script. I didn't change my keyboard language or my computer language. My keyboard language is in French(Canada) while my pc is in English. On my keyboard to type \ you have to press Ctrl-Alt and the key situated at the left of the number 1. While the | is shift and the same button. I found a solution to correct the problem, when it happens I run the this script : run("notepad.exe") sleep(1000) WinActivate("Untitled - Notepad") Send("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\") Send("|||||||||||||||||||||||||||||||||||||||||") Then I re-run the script I wanted. So I was wondering did you had a similar problem and do you have a better way to prevent this from happening again? Many thanks J-F
Simucal Posted June 13, 2006 Posted June 13, 2006 I have been trying to find the post.. but I believe someone before said that in a low percentage of their Send()'s it would send the wrong key. I still havent found it though. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
Moderators SmOke_N Posted June 13, 2006 Moderators Posted June 13, 2006 If the object your sending it to has a ControlID you may look at ControlSetText() rather than Send(). @Simucal - it was vollyman and someone else I believe Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
seandisanti Posted June 13, 2006 Posted June 13, 2006 If the object your sending it to has a ControlID you may look at ControlSetText() rather than Send(). @Simucal - it was vollyman and someone else I believe i'd put money on it that they're either pressing shift, or they have a shift down somewhere in their script. in situations where i have to use ControlSend or Send instead of ControlSetText, alot of times i'll have it use ascii values instead of typing the characters...example: $string = "This is the string i want sent" for $x = 1 to stringlen($string) Send(chr(asc(StringMid($string,$x,1)))) Next it doesn't slow down execution too much, but makes it so that shift or capslock state won't affect keys being transmitted...
Vicks Posted June 14, 2006 Posted June 14, 2006 i have a problem with keys also if you type them to fast it can't keep up with you, [s]Autoit[/s]
jvanegmond Posted June 14, 2006 Posted June 14, 2006 Just a wild thought.. Try sending the keys 'raw' by changing the flag to 1 (Send ( "keys" [, flag] ) ) example Send("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",1) github.com/jvanegmond
w0uter Posted June 14, 2006 Posted June 14, 2006 (edited) try: clipput() & send('^v') Edited June 14, 2006 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
J-F Posted June 14, 2006 Author Posted June 14, 2006 Really usefull informations. Many thanks to all of you. Cameronsdad and SmOke_N, your tips are really usefull and it may help my scripts to be "bugs free"
seandisanti Posted June 14, 2006 Posted June 14, 2006 (edited) Really usefull informations.Many thanks to all of you. Cameronsdad and SmOke_N, your tips are really usefull and it may help my scripts to be "bugs free"no problem, always gald to help. and debugging is half of the fun....***edit*** typo Edited June 14, 2006 by cameronsdad
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