Bi0haZarD Posted June 26, 2005 Share Posted June 26, 2005 (edited) 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) nextplease 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 4000000then it doesn't have a problem...thanks Edited June 26, 2005 by Bi0haZarD Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted June 26, 2005 Share Posted June 26, 2005 try wrapping the GUICtrlRead functions with Int(). I believe that its passing the text as a string, and not a number. Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Bi0haZarD Posted June 27, 2005 Author Share Posted June 27, 2005 Thanks a lot MSLx that fixed it. just to test it i tried 90 million and it still worked =) thanks a lot Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted June 28, 2005 Share Posted June 28, 2005 Can I ask why you needed to loop something more than a million times? I don't think I've ever heard of an array even 1/10 that size loaded into memory Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Bi0haZarD Posted June 28, 2005 Author Share Posted June 28, 2005 (edited) needed some way to increment file names for my script "ReSave" as seen heresince 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 June 28, 2005 by Bi0haZarD Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted June 29, 2005 Share Posted June 29, 2005 Oh Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now