Jump to content

Recommended Posts

Posted

Hi everyone ;)

I need your help on a problem. Thank you in advance for your help. Best regards :ILA2:

AutoIt v3.3.8.1

$DS = "test1 test2 test3 test4 test5 test6 test7 test9 test10"


Dim $DM1, $DM2, $DS, $i

For $i = 1 To 500 Step 1
$DM1 = StringLeft ($DS, $i)

If StringRegExp($DM1, "(?x)\" & Chr(32)) Then
$DM2 = StringReplace ($DM1, Chr(32), "")
If Not ($DM2 = ("")) Then Ver()

$DS = StringReplace ($DS, $DM2, "")

EndIf

Next

Func Ver()
MsgBox (0, "", $DM2)
EndFunc


MsgBox(0, "", "Bye!")
Posted

And the question is?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

OR

$DS = "test1 test2 test3 test4 test5 test6 test7 test9 test10"

MsgBox (0, "", $DS)

Dim $DM1, $DM2, $DS, $i

For $i = 1 To 500 Step 1
$DM1 = StringLeft ($DS, $i)

If StringRegExp($DM1, "(?x)" & Chr(32)) Then
$DM2 = StringReplace ($DM1, Chr(32), "")
If Not ($DM2 = ("")) Then Ver()

$DS = StringReplace ($DS, $DM2, "")

MsgBox (0, "", $DS)

EndIf

Next

Func Ver()
MsgBox (0, "", $DM2)
EndFunc


MsgBox(0, "", "Bye!")
Posted

I don't know what you try to achieve with your script and what kind of problem you have.

We need more information to help you.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Which result do you get and what do you expect?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Doesn't this script do the same?

$DS = "test1 test2 test3 test4 test5 test6 test7 test9 test10"
Global $asResult = StringSplit($DS, " ")
For $i = 1 To $asResult[0]
    MsgBox(0, "", $asResult[$i])
Next
MsgBox(0, "", "Bye!")

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted
:D

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Use

Call($FN1)

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

No big deal :rolleyes:

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Good news of the day ^_^

So it's time to leave the office and have a nice weekend!

My UDFs and Tutorials:

  Reveal hidden contents

 

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
  • Recently Browsing   0 members

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