Here's some code that will do what you want:
sync on : sync : sync
global Combinations as integer
Source as string = "abcde"
DoMixing(Source, "")
print Combinations
sync
wait key
function DoMixing(Source as string, SoFar as string)
local i as integer
if len(SoFar) < len(Source)
for i=1 to len(Source)
DoMixing(Source, SoFar + mid$(Source, i))
next i
else
inc Combinations
print SoFar
endif
endfunction
Watch out though ...
1 letter = 1 combination (1^1)
2 letters = 4 combinations (2^2)
3 letters = 27 combinations (3^3)
4 letters = 256 combinations (4^4)
5 letters = 3125 combinations (5^5)
8 letters will be 16777216 different combinations.
The number of combinations can get very high very fast.