Make a number combinations
#1
Posted 11 May 2012 - 05:44 PM
Example:
Numbers:
01 02 03 04 05 06
Now must make a combinations:
01, 02, 03, 04, 05
01, 02, 03, 04, 06
01, 02, 03, 05, 06
01, 02, 04, 05, 06
01, 03, 04, 05, 06
02, 03, 04, 05, 06
We must use array:
16 23 34 36 37 44
13 17 26 30 32 38
and to make of combinations...
Very thanks
#2
Posted 11 May 2012 - 06:04 PM
Get DOM object by XPATH...now works in up to 1/20th second: http://www.autoitscript.com/forum/topic/140685-ie-udf-to-get-dom-object-by-xpath/page__hl__xpath__fromsearch__1
The beginnings of an IE script recorder: http://www.autoitscript.com/forum/topic/150444-ie9-and-10-recording/
#3
Posted 11 May 2012 - 07:11 PM
Array: 01 02 03 04 05 06
And make of combinations... 01 02 03 04 05 06
result:
01, 02, 03, 04, 05
01, 02, 03, 04, 06
01, 02, 03, 05, 06
01, 02, 04, 05, 06
01, 03, 04, 05, 06
02, 03, 04, 05, 06
Combinations save in .txt file.
#4
Posted 11 May 2012 - 07:48 PM
#include <Array.au3> Local $aArray[6] = ["01","02","03","04","05","06"] Local $aNewArray = _ArrayPermute($aArray, ",") ;Using Default Parameters _ArrayDisplay($aNewArray, "Array Permuted")
Edited by jdelaney, 11 May 2012 - 08:58 PM.
Get DOM object by XPATH...now works in up to 1/20th second: http://www.autoitscript.com/forum/topic/140685-ie-udf-to-get-dom-object-by-xpath/page__hl__xpath__fromsearch__1
The beginnings of an IE script recorder: http://www.autoitscript.com/forum/topic/150444-ie9-and-10-recording/
#5
Posted 11 May 2012 - 08:56 PM
#6
Posted 11 May 2012 - 09:02 PM
Then this might not help either, but dumping this array to a txt file looks similar to your expected resultCant understand...
#include<array.au3> Local $aArray[6] = ["01","02","03","04","05","06"] Local $aNewArray = _ArrayCombinations($aArray, 5 , ",") _ArrayDisplay($aNewArray, "Array Combos")
Edited by boththose, 11 May 2012 - 09:03 PM.
#7
Posted 11 May 2012 - 09:15 PM
#include<array.au3> Local $aArray[6] = ["01","02","03","04","05","06"] Local $aArray[6] = ["7","9","18","19","35","40"] Local $aNewArray = _ArrayCombinations($aArray, 5 , ",") _ArrayDisplay($aNewArray, "Array Combos")
#8
Posted 11 May 2012 - 09:23 PM
#include<array.au3> Local $aArray[6] = ["01","02","03","04","05","06"] _ArrayDisplay($aArray, "Array Combos") Local $aArray[6] = ["7","9","18","19","35","40"] _ArrayDisplay($aArray, "Array Combos")
You are not doing what you intend. Read the helpfile.
#9
Posted 11 May 2012 - 09:47 PM
Somebody...
#10
Posted 12 May 2012 - 02:26 AM
You have two variables with the same name. Rename one of them.Now is correct but i add more line and not work anymore.
#include<array.au3> Local $aArray[6] = ["01","02","03","04","05","06"] Local $aArray[6] = ["7","9","18","19","35","40"] Local $aNewArray = _ArrayCombinations($aArray, 5 , ",") _ArrayDisplay($aNewArray, "Array Combos")
#11
Posted 12 May 2012 - 05:25 AM
You have two variables with the same name. Rename one of them.
Edited by Read, 12 May 2012 - 05:26 AM.
#12
Posted 12 May 2012 - 02:20 PM
#13
Posted 12 May 2012 - 06:54 PM
#14
Posted 12 May 2012 - 07:08 PM
I'm not programmer and don't understand this language.
This would beg the question, "why are you doing this?".
To get help you need to provide examples of what you expect, what is happenning/not happening, and, whatever code you have written.
kylomas
#15
Posted 12 May 2012 - 07:21 PM
#include<array.au3> Local $aArray[6] = [("01","02","03","04","05","06")|("7","9","18","19","35","40")] Local $aNewArray = _ArrayCombinations($aArray, 5 , ",") _ArrayDisplay($aNewArray, "Array Combos")
Edited by Read, 12 May 2012 - 07:22 PM.
#16
Posted 12 May 2012 - 08:21 PM
You have two variables with the same name. Rename one of them.
How How How???
#include<array.au3> Local $aArray[6] = ["01","02","03","04","05","06"] Local $aArray[6] = ["7","9","18","19","35","40"] Local $aNewArray = _ArrayCombinations($aArray, 5 , ",") _ArrayDisplay($aNewArray, "Array Combos")
#include<array.au3> Local $aArray[6] = ["01","02","03","04","05","06"] Local $bArray[6] = ["7","9","18","19","35","40"] ; this array is not named the same as the one before it! Local $aNewArray = _ArrayCombinations($aArray, 5 , ",") _ArrayDisplay($aNewArray, "Array Combos")
Edited by somdcomputerguy, 12 May 2012 - 08:22 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





