Sign in to follow this  
Followers 0
Systems By

Need some help again

3 posts in this topic

#1 ·  Posted (edited)

Hi everyone. I need to do a simple change with the following code:

For $x = $aRecords[0] To 6 Step - 1

    $aRecords[$x] = StringStripWS($aRecords[$x],3)

    If Not FileExists($homepcbudir &$aRecords) Then MsgBox(64, 'Info', 'File ' & $homepcbudir & $aRecords[$x] & ' Does not exist')

    

    If $aRecords[$x] <> "" Then

        Do

            FileDelete($homepcbudir & $aRecords[$x])

            ToolTip('On this file:' & @CR & $homepcbudir & $aRecords[$x], 0, 0)

            Sleep(500)

        Until Not FileExists($homepcbudir & $aRecords[$x])

     ;SplashTextOn("Autobackup", "Deleting " & $home & $aRecords[$x], 200, 150)

        Sleep(200)

     ;SplashOff()

    EndIf

Next

Is it possible to modify this line:

For $x = $aRecords[0] To 6 Step - 1

so that the program performs the for statement on the first four files in the array only? I have looked all over and although it's probably the easiest thing to do, I am having a hard time doing the modification.

Thanks.

Edited by Systems By

Share this post


Link to post
Share on other sites



For $x = 1 To 4
?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

For $x = 1 To 4
?
Thanks SmOke_N, I knew it was something easy. I think it's just too hot, I can't think too well :D

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