Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; msgbox.vk.com
- #NoTrayIcon
- #SingleInstance Force
- SetBatchLines -1
- SetWorkingDir, % A_ScriptDir
- SaveToFile := "output.txt"
- InputChars := "123"
- MyLenght := "3"
- Loop, % StrLen(InputChars)
- SingleChar%A_Index% := SubStr(InputChars, A_Index, "1")
- If (MyLenght >= "1")
- {
- Loop, % StrLen(InputChars)
- {
- CurrentChar1 = % SingleChar%A_Index%
- if (MyLenght == "1")
- Output = % Output "`n" CurrentChar1
- If (MyLenght >= "2")
- {
- Loop, % MyLenght
- {
- CurrentChar2 = % CurrentChar1 SingleChar%A_Index%
- if (MyLenght == "2")
- Output = % Output "`n" CurrentChar2
- If (MyLenght >= "3")
- {
- Loop, % MyLenght
- {
- CurrentChar3 = % CurrentChar2 SingleChar%A_Index%
- if (MyLenght == "3")
- Output = % Output "`n" CurrentChar3
- }
- }
- }
- }
- }
- }
- FileAppend, % Output, % SaveToFile
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment