Jump to content
chacoya121

help add code to make combination

Recommended Posts

chacoya121
HotKeySet("{Esc}", "_exit")
Run("notepad.exe")
WinWaitActive("")
Sleep(500)
$Letter = StringSplit("A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9", ",")
Combi("", 5)
Func Combi($Str, $MaxLen)
Dim $i
    if StringLen($Str) = $MaxLen Then
        Send("Combination = " & $Str & @CRLF)
;       Sleep(50)
        Return
    EndIf
    For $i = 1 to $Letter[0]
        Combi($Str & $Letter[$i], $MaxLen)
    Next
EndFunc


Func _exit()
    Exit
EndFunc

 

can someone help add code to this script to make generate combination

3 letters with 2 numbers

instead of

AAAAA

AAAAB

AAAAC

 

start at

AAA01

AAA02

AAA03

skiping the 2 letters

 

Edited by Melba23
Added code tags

Share this post


Link to post
Share on other sites
Melba23

chacoya121,

And why do you need to do this?

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
chacoya121

- at first i try to make combination for lottery, then i saw this script, im just curious

- and i try to understand how is this function work, by putting msgbox in every line and run

-then i curious, what if combine between letters and numbers

-sorry im newbie to programming world , try to understand and learn

 

 

 

 

Share this post


Link to post
Share on other sites
Melba23

chacoya121,

I asked because this sort of code is often used to produce rainbow tables - and as such we do not support it. Please note that I am not accusing you of anything nor suggesting that your motives are other than innocent, but I am still closing the thread.

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Similar Content

    • PickPocketz
      By PickPocketz
      Hi Guys and Gals,

      I'm attempting to write a script that will give me an output of all the possible combinations of a predifined set. For example I have five letters "P, K, R, A, W" that I want to run through and get every last combination from it.

      Such as if I had then numbers 0, 1, 2 and a 3 digit combination I would have Twenty Seven different outcomes ranging from 000, 001 - 221, 222.

      I wouldn't have a problem if I were ok with having repeated outcomes or writing a long list of code but I do not want repeats and I want to eventually set up a GUI based system to accept Alpha & Alphanumeric characters of any length and do what I am looking for now.

      This is the basic layout I have:

      #include <GUIConstantsEx.au3> #include <Array.au3> #include <StaticConstants.au3> Const $title = "Combinator" Global $wX = 300, $wY = 25 Local $array[5] = ["P", "K", "R", "A", "W"] GUICreate($title, $wX, $wY) GUICtrlCreateLabel("COMBINATIONS", 5, 5, $wX - 10, $wY - 10, $SS_CENTER) GUISetState() While 1 $msg = GUIGetMsg() Select case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func _generate() ;Combo Loop Sleep(5000) ;Allow Time to See Combination EndFunc
×