Max in montreal Posted January 8, 2007 Posted January 8, 2007 Im trying to play a game, using autoit. i have a list of words, about 3000 in total. I can use only certain letters, I know this in advance. I would like to guess different words, but by using only the allowed letters. So lets say the allowed letters are a,b,c,t,s,w,g i would then like to send cat,bat,sat,gas....and the rest of the words on the list that use those letters. hat is on the list of words, but you cannot use hat because there is no H in the letters allowed. So im actually looking for 2 things...a way to imput 16 letters, and a way to check the word so it is made with only the allowed letters... what can i use?
Xenobiologist Posted January 8, 2007 Posted January 8, 2007 Hi, is possible. Where is your problem? Or do you wait for somebody to write it? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Max in montreal Posted January 8, 2007 Author Posted January 8, 2007 (edited) I want to write it, i would just like a hint to how i should go about it. I have tried using the send command, and sending all the words on the list, but more often then not, the words cannot be used because they contain letters that are not usable.so before sending, i would like to see if the word will work, and if it does not, just to skip to the next word on the list. I did not expect a whole solution, just some commands that i should look into. Edited January 8, 2007 by Max in montreal
seandisanti Posted January 8, 2007 Posted January 8, 2007 I want to write it, i would just like a hint to how i should go about it.I have tried using the send command, and sending all the words on the list, but more often then not, the words cannot be used because they contain letters that are not usable.so before sending, i would like to see if the word will work, and if it does not, just to skip to the next word on the list.I did not expect a whole solution, just some commands that i should look into.do you have to use all of the letters, or just any of them? i wrote a spreadsheet a while back to cheat on a word game on pogo, and i've got an anagram script too, but depending on the number of letters, it can really take a while
BALA Posted January 8, 2007 Posted January 8, 2007 Also, since there are hundreds of thousands of words in the English language, that may be something you should be thinking about. [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
seandisanti Posted January 8, 2007 Posted January 8, 2007 Also, since there are hundreds of thousands of words in the English language, that may be something you should be thinking about.That doesn't really matter. the wordlist can be read into an array, or a giant string, and then results can be checked against the array/string, and sent if they match. The string approach is alot faster of course, or there are other ways to check 'words'. typically what i'll do, is use MS Office's spell checker via COM to spellcheck results.
Max in montreal Posted January 9, 2007 Author Posted January 9, 2007 (edited) Thanks for the help in advance! Basically i have a list of 3 and 4 letter words. about 4000 in total. the game is played like boggle, where you get a 4 by 4, with a different letter in each. the object of the game is to guess words that can be made using the letters in the 4 by 4 grid, going up, down left right, diagonal, and so on. so far all i did was send each word in my list. Its doing fine, but i would like to tweak it slowly getting better. the game only gives you 3 minutes to guess words, and if the letter s is not in the grid, i would not send words with the letter s in them... so when the game starts, i want to be able to type in the 16 letters. asktdergfrvedscd check the first word in the list dog no good, the letter O in dog is not in the 16 letters typed in at the start of the program...next word cat all letters in cat are in the 16, so send the word cat. thats it. so far i am just sending words without checking send words from my list that are made up of only those letters, would be more efficiant Edited January 9, 2007 by Max in montreal
seandisanti Posted January 10, 2007 Posted January 10, 2007 Thanks for the help in advance!Basically i have a list of 3 and 4 letter words. about 4000 in total.the game is played like boggle, where you get a 4 by 4, with a different letter in each. the object of the game is to guess words that can be made using the letters in the 4 by 4 grid, going up, down left right, diagonal, and so on.so far all i did was send each word in my list. Its doing fine, but i would like to tweak it slowly getting better. the game only gives you 3 minutes to guess words, and if the letter s is not in the grid, i would not send words with the letter s in them...so when the game starts, i want to be able to type in the 16 letters.asktdergfrvedscdcheck the first word in the listdogno good, the letter O in dog is not in the 16 letters typed in at the start of the program...next wordcatall letters in cat are in the 16, so send the word cat.thats it.so far i am just sending words without checkingsend words from my list that are made up of only those letters, would be more efficiantdo the letters have to be arranged? i mean does the second letter of the word you're spelling have to be touching the first, or anything like that? it seems like, StringRegExp would be the way to go. you give the script the letters, then test each word in your list. There's a very good StringRegExp tutorial in the helpfile if you've not played with them yet.
Moderators SmOke_N Posted January 10, 2007 Moderators Posted January 10, 2007 do the letters have to be arranged? i mean does the second letter of the word you're spelling have to be touching the first, or anything like that? it seems like, StringRegExp would be the way to go. you give the script the letters, then test each word in your list. There's a very good StringRegExp tutorial in the helpfile if you've not played with them yet.I don't recommend the help file SRE guide, it hasn't really been updated since the revision in 3.1.108 (I believe it was 108).This is the guide I use: http://perldoc.perl.org/perlre.html#Regular-Expressions Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Max in montreal Posted January 11, 2007 Author Posted January 11, 2007 I don't recommend the help file SRE guide, it hasn't really been updated since the revision in 3.1.108 (I believe it was 108).This is the guide I use: http://perldoc.perl.org/perlre.html#Regular-Expressionsthanks guys, thats just what i needed a push in the right direction, ill give this a try, and ill let you know how it worked.for the other question, yes the letters have to be in a cretain order, but i might not have to go that far...If i am sending 3 and 4 letter words, so far there are only 4000 in total...give or take... If cannot use the letter s, that will drastically reduce the word list, and so on...
Paulie Posted January 12, 2007 Posted January 12, 2007 (edited) I search for "permutations" got me this:http://www.autoitscript.com/forum/index.ph...st&p=190961GO SMOKE_N! Edited January 12, 2007 by Paulie
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