Jump to content

Possible?


Info
 Share

Recommended Posts

I want the Send function to Send all 100 numbers from 000 to 100 without writing it over and over like:

Send ( "000")
Send ( "001")
Send ( "002")
Send ( "003")
Send ( "004")
Send ( "005")
Send ( "006")
Send ( "007")

Possible?

Link to comment
Share on other sites

You could try something like:

Dim $iCount = 0
Dim $szString = ""

For $iCount = 0 to 100
     If ($iCount < 10) Then
          $szString &= "00" & $iCount & @CRLF
     ElseIf ($iCount < 100) Then
          $szString &= "0" & $iCount & @CRLF
     Else
          $szString &= $iCount & @CRLF
    EndIf
Next

Send($szString)

Or you could use StringFormat("%3s",$szString) instead of the If statements. I'm not sure if it will print the preceeding zeros though.

-CMR

Link to comment
Share on other sites

Thank you :)

And if I want it to Send just one number from all the 100, and then do something, and then the next number, like:

Send ( "001")
Sleep ( 1000 )
Send ( "002")
Sleep ( 1000 )
Send ( "003")
Sleep ( 1000 )
Send ( "002")
Sleep ( 1000 )
Send ( "004")

How?

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...