Jump to content

max of 1 million on for to statements?


Recommended Posts

ok, i'm making a script with a GUI that has start/stop numbers. when the user types in anything higher then 1million (1000000) then the program halts and you have to right click the icon in the system tray to exit out.

heres a portion of my script that deals what happens when the user hits "start"

Case $msg = $Buttonstart
     $istart = GUICtrlRead($inputstart)
     $istop = GUICtrlRead($inputstop)
     $iext = GUICtrlRead($inputext)
     $ipath = GuiCtrlRead($InputFolder)
     $ifile = GuiCtrlRead($InputFile)
     $count = 1
    for $i = $istart to $istop
        If FileExists($ipath & $ifile & $i & $iext) Then
            ClipPut($ipath & $ifile & $i & $iext)
            GUICtrlSetData($Listbox,$ipath & $ifile & $i & $iext)
            $count = $count+1
        Else            
        $count = $count+1
    EndIf
    GuiCtrlSetData($Labelcurr,"Current File: " & $ipath & $ifile & $i & $iext)
    next

please note what i did wrong, if i put 999999 for the stop number then it doesn't have a problem, only when its 1000000 or higher then it halts.

if i manually set the stop number by putting:

for $i = $istart to 4000000

then it doesn't have a problem...

thanks :)

Edited by Bi0haZarD
Link to comment
Share on other sites

needed some way to increment file names for my script "ReSave" as seen here

since the recovery program that i used renamed files to "cluster ######.JPG" the cluster number refering to where the picture was on the hard drive.. so the max number could be really high depending on the size of the hard drive and where the image was located on the drive.

Edited by Bi0haZarD
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...