Jump to content

script to skip next in turn sending if it face certain text


Recommended Posts

I were thinking about this for hours but It didn't work.

#include <String.au3>

$Text = FileRead("file.txt")

$Text = _StringBetween($Text, "<block>", "</block>")

For $i = 0 To UBound($Text) -1

Send($Text[$i])

Sleep(12000)

Next

This script sends text that lies between marks through pauses.

How can I make it to skip next in turn sending if it face certain text?

Help please.

Link to comment
Share on other sites

use this:

#include <String.au3>

$Text = FileRead("file.txt")
$Text = _StringBetween($Text, "1", "2")

For $i = 0 To UBound($Text) -1
if $text[$i]<>"some text" Then send()

Next

Func send()
Send($Text[$i])

Sleep(12000)
endFunc
[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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...