Jump to content

How to change this code in order to send text more precisely?


Recommended Posts

#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 by haXor4life
Link to comment
Share on other sites

#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

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

*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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...