Sign in to follow this  
Followers 0
maxrealqnx

Where am I doing wrong ?

18 posts in this topic

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!")

Share this post


Link to post
Share on other sites



And the question is?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

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!")

Share this post


Link to post
Share on other sites

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:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

And the question is?

Hi!

The test10 result is wrong :(

Edited by maxrealqnx

Share this post


Link to post
Share on other sites

Which result do you get and what do you expect?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Which result do you get and what do you expect?

I want to show each of them individually.

Share this post


Link to post
Share on other sites

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!")

1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
:D
1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Hi again everyone

Please help me again. Can I make run any function with the value ? Best regards :ILA2:

Dim $FN1

$FN1 = "Test1"

$FN1()

;Test()

Func Test()
MsgBox(0, "", "Success!")
EndFunc ;==>Test

Share this post


Link to post
Share on other sites

Use

Call($FN1)

1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

No big deal :rolleyes:


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Good news of the day ^_^

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

1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0