haXor4life Posted May 25, 2009 Share Posted May 25, 2009 (edited) #include <String.au3> $Text = FileRead("file.txt") $Text = _StringBetween($Text, "anything", "anything") For $i = 0 To UBound($Text) -1 Send($Text[$i]) Sleep(5000) Next Сan you tell how to change this code in order to send text more precisely? Please, code, instead of advice about Controlsend or anything of this kind. Helpfile didn't help me. Right now send is inadequate: punctuation come to letters etc This code actually sends text between "anything". Edited May 25, 2009 by haXor4life Link to comment Share on other sites More sharing options...
martin Posted May 25, 2009 Share Posted May 25, 2009 #include <String.au3> $Text = FileRead("file.txt") $Text = _StringBetween($Text, "anything", "anything") For $i = 0 To UBound($Text) -1 Send($Text[$i]) Sleep(5000) Next Сan you tell how to change this code in order to send text more precisely? Please, code, instead of advice about Controlsend or anything of this kind. Helpfile didn't help me. Right now send is inadequate: punctuation come to letters etc This code actually sends text between "anything".What is it that you think is imprecise about what you are doing at the moment? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Zedna Posted May 25, 2009 Share Posted May 25, 2009 (edited) Try to use ControlSetText() where Send() is problematic - especially on non-english keyboard layouts. Edited May 25, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
haXor4life Posted May 26, 2009 Author Share Posted May 26, 2009 What is it that you think is imprecise about what you are doing at the moment?Sending of non-english letters for example. Link to comment Share on other sites More sharing options...
haXor4life Posted May 26, 2009 Author Share Posted May 26, 2009 (edited) Try to use ControlSetText() where Send() is problematic - especially on non-english keyboard layouts.ControlSetText("", "", "", $Text[$i]) It didn't sent anything. Edited May 26, 2009 by haXor4life Link to comment Share on other sites More sharing options...
Valuater Posted May 26, 2009 Share Posted May 26, 2009 Try... Send($Text[$i], 1) 8) Link to comment Share on other sites More sharing options...
haXor4life Posted May 26, 2009 Author Share Posted May 26, 2009 (edited) Try... Send($Text[$i], 1) 8)It didn't work. It just reprints symbols in current layout. Can someone help to make it some kind of copy/paste? Edited May 26, 2009 by haXor4life Link to comment Share on other sites More sharing options...
Authenticity Posted May 26, 2009 Share Posted May 26, 2009 You can split the string and use the {ASC value} using AscW. Right now send it not fully unicode compatible. Look here for example Link to comment Share on other sites More sharing options...
haXor4life Posted May 26, 2009 Author Share Posted May 26, 2009 (edited) Thank you. ClipPut ($Text[$i]) Send('^v')This works great. Edited May 26, 2009 by haXor4life Link to comment Share on other sites More sharing options...
Authenticity Posted May 26, 2009 Share Posted May 26, 2009 I think it's self-explanatory. #include <String.au3> $Text = FileRead("file.txt") $Text = _StringBetween($Text, "anything", "anything") For $i = 0 To UBound($Text) - 1 ClipPut($Text[$i]) Send('^v') Sleep(5000) Next Link to comment Share on other sites More sharing options...
haXor4life Posted May 26, 2009 Author Share Posted May 26, 2009 (edited) Thank you! It is really cool that you exist. Edited May 26, 2009 by haXor4life Link to comment Share on other sites More sharing options...
Inverted Posted May 26, 2009 Share Posted May 26, 2009 Thank you! It is really cool that you exist.Haha, best "thank you" post ever ! Link to comment Share on other sites More sharing options...
Zedna Posted May 26, 2009 Share Posted May 26, 2009 If it's keyboard layout related and not unicode re;ated problem then look here:http://www.autoitscript.com/forum/index.ph...442?entry215442http://www.autoitscript.com/forum/index.ph...ost&p=84092 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
haXor4life Posted May 26, 2009 Author Share Posted May 26, 2009 Do you guys know why this code #include <String.au3> Global $aTmp, $sTmp Global $Text = FileRead("file.txt") $Text = _StringBetween($Text, "anything", "anything") For $i = 0 To UBound($Text) - 1 $aTmp = StringSplit($Text[$i], '') $sTmp = '' For $j = 1 To $aTmp[0] $sTmp &= '{ASC ' & AscW($aTmp[$j]) & '}' Next Send($sTmp) Sleep(5000) Next sends ♪◙ with text? And how to get rid of this? This code #include <String.au3> $Text = FileRead("file.txt") $Text = _StringBetween($Text, "anything", "anything") For $i = 0 To UBound($Text) - 1 ClipPut($Text[$i]) Send('^v') Sleep(5000) Next stopped working. It just sends v after reboot of computer. Another reboot doesn't help. Link to comment Share on other sites More sharing options...
ProgAndy Posted May 26, 2009 Share Posted May 26, 2009 you could try this: http://www.autoitscript.com/forum/index.ph...st&p=585432 *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
haXor4life Posted May 26, 2009 Author Share Posted May 26, 2009 you could try this: http://www.autoitscript.com/forum/index.ph...st&p=585432I don't know how. Link to comment Share on other sites More sharing options...
haXor4life Posted May 27, 2009 Author Share Posted May 27, 2009 Okay I changed Send('^v') with Send("+{INSERT}") and it works again. Hope after reboot it will continue to work. 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