youtuber Posted November 19, 2018 Posted November 19, 2018 Can be done with a single loop up to the specified $HowMany ? Sample : 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 $HowMany = 15 For $i = 1 To $HowMany Step 1 If $i = 10 Then ExitLoop MsgBox(48, "", "0" & $i) Next For $m = 10 To $HowMany Step 1 MsgBox(48, "", $m) Next
Moderators JLogan3o13 Posted November 19, 2018 Moderators Posted November 19, 2018 Something like this (removed the msgboxes)? $HowMany = 15 For $i = 1 To $HowMany Step 1 If $i = 10 Then For $m = 10 To $HowMany Step 1 ConsoleWrite($m & @CRLF) Next ExitLoop EndIf Next youtuber 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
youtuber Posted November 19, 2018 Author Posted November 19, 2018 Two for still $HowMany = 15 For $i = 1 To $HowMany Step 1 ConsoleWrite("0" & $i & @CRLF) If $i = 9 Then For $m = 10 To $HowMany Step 1 ConsoleWrite($m & @CRLF) Next ExitLoop EndIf Next This operation cannot be done with single for?
TheXman Posted November 19, 2018 Posted November 19, 2018 10 minutes ago, youtuber said: This operation cannot be done with single for? Something like this maybe? $HowMany = 15 $s = "Sample:" For $i = 1 To $HowMany $s &= StringFormat(" %02i", $i) Next MsgBox(0,"",$s) CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
youtuber Posted November 19, 2018 Author Posted November 19, 2018 (edited) @TheXman Actually I use both examples above but I wonder if it is done with a single for loop? I create as much txt file as the user wants, but I. FileOpen($FOLDER & '\' & $TXTNAME & "-" & $s & ".txt", 1) you Convert txt to : TXTNAME - 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15.txt what I want is TXTNAME-01.txt TXTNAME-02.txt ... and TXTNAME-09.txt TXTNAME-10.txt ... Edited November 19, 2018 by youtuber
TheXman Posted November 19, 2018 Posted November 19, 2018 (edited) Unfortunately, I don't understand what you're asking. You mean like this? $HowMany = 15 For $i = 1 To $HowMany ConsoleWrite(StringFormat("%02i.txt", $i) & @CRLF) Next Edited November 19, 2018 by TheXman youtuber 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
youtuber Posted November 19, 2018 Author Posted November 19, 2018 @TheXman Yes thank you benefit this my work you're great
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