Marlo Posted December 6, 2008 Posted December 6, 2008 Hello fellow forumites! i have once again come up with an idea for a script and have been foiled in my efforts by my crappy brain So anyway...I want to make a script that will generate words, simple right? no So i have an array in my script that contains all the letters of the alphabet (a-z) and what i want to do is cycle through each letter in my script and when it gets to Z it reset back to A and then add a new letter which will then cycle through until it hits Z. When the second one hits Z the first will be set to B and then the second one will cycle again and until it hits Z and etc etc... (maybe a bit like how a clock increments?) and it will keep doing this (adding new letters and cycleing through) until the script is told to stop. So basicly if i run this script for about a year i should end up with a log file with every word in the world in it ^^ So thats my problem. i havnt the foggyiest how i would go about this. Any theroies would be great. Regards Click here for the best AutoIt help possible.Currently Working on: Autoit RAT
Rental Posted December 7, 2008 Posted December 7, 2008 look at http://www.autoitscript.com/forum/index.ph...1&hl=monkey
Marlo Posted December 7, 2008 Author Posted December 7, 2008 Not what im after =( Click here for the best AutoIt help possible.Currently Working on: Autoit RAT
Rental Posted December 7, 2008 Posted December 7, 2008 can you explain it a little better? I don't get a thing you said beside you want it to make words
dbzfanatic Posted December 7, 2008 Posted December 7, 2008 Nested For loops. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
Marlo Posted December 7, 2008 Author Posted December 7, 2008 Yeh my description kind of sucks dont it I'll try and simplify it. If you think of a clock. The secong digits (the minutes) goes from 1-60 and when the minutes reach 60 it will increment the first value (hours) by 1 and then reset the minutes back to 00. Now i want to do this with the alphabet instead of numbers. and each time the alphabet reaches Z it will increment the first value by another letter. So it will go somthing like: A:X -> A:Y -> A:Z -> B:A -> B:B and it will do this until both letters reach Z (Z:Z) And when this happens it will add another letter (A:A:A -> A:A: This is the best way i can describe it =( Nested for loops wouldnt be possible i dont think as id have to add a loop per letter which would restrict it as i want it to do it automatically. Hope you understand now :D7 Click here for the best AutoIt help possible.Currently Working on: Autoit RAT
oMBRa Posted December 7, 2008 Posted December 7, 2008 after some hours of hard work, here it is: Global $HOWMANYTIMES = 3 ; 2 = A:A, 3 = A:A:A... Global $Times[$HOWMANYTIMES] Global $aPos = $HOWMANYTIMES - 1 Global $iPos = 0 For $i = 0 To $HOWMANYTIMES - 1 $Times[$i] = 65 Next For $x = 0 To (26 ^ $HOWMANYTIMES) - 1 For $z = 0 To $HOWMANYTIMES -1 ConsoleWrite( (Chr($Times[$z]) & ':')) If $z = $HOWMANYTIMES - 1 Then ConsoleWrite(@LF) EndIf Next If $Times[$aPos] < 91 Then $Times[$aPos] = $Times[$aPos] + 1 EndIf For $b = $aPos To 0 Step -1 If $Times[$b] = 91 Then $Times[$b] = 65 If $b = 0 Then ExitLoop EndIf $Times[$b - 1] = $Times[$b - 1] + 1 EndIf Next Next
Marlo Posted December 7, 2008 Author Posted December 7, 2008 Wow you actually wrote the code too! Your a legend oMBra <3 Click here for the best AutoIt help possible.Currently Working on: Autoit RAT
enaiman Posted December 7, 2008 Posted December 7, 2008 This is something I've been thinking about myself - it is easy to make a script to take care of this; you only need to make the generated string long enough (like 25 - 30 characters or more) to get some meaning out of the string. There are a couple of problems though: - using 25-30 characters long string will generate alot of combinations (too lazy to attempt to calculate) - letting this running for an year could end up in filling your hard drive completely ... (or maybe more, maybe less) - you will need to create a new file once in a while (when the log file gets too big) ... but these can be solved one by one ... - Considering the huge amount of text lines - how long do you think it will take you to read them and find the meaningful lines? (a scripted search for words among so many lines/characters is out-of-question). This is the real challenge. Anyway - I might be wrong in some aspects; nobody is perfect. I wish you good luck with this SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
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