KurogamineNox Posted September 22, 2010 Posted September 22, 2010 What would I have to do to create a random word generator?
AdmiralAlkex Posted September 22, 2010 Posted September 22, 2010 Like this? Local $asWords[2] = ["Boat", "Car"] MsgBox(0, "Here's a word for you", $asWords[Random(0, UBound($asWords), 1)]) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
KurogamineNox Posted September 22, 2010 Author Posted September 22, 2010 That is one way, though your code seems to error at times. I was thinking of like having it generate a word and storing it in a variable for later uses. If possible able to make words without having to list words(If possible) Ill go with any suggestion.
maqleod Posted September 23, 2010 Posted September 23, 2010 There is no way you can get something to list words without some sort of list to verify they are actually words, otherwise you'll just get jumbles of letters returned. [u]You can download my projects at:[/u] Pulsar Software
KurogamineNox Posted September 23, 2010 Author Posted September 23, 2010 There is no way you can get something to list words without some sort of list to verify they are actually words, otherwise you'll just get jumbles of letters returned.That is what I was thinking lol, but creating a big list of words is time consuming. Well results are results, I just don't know why the guys code crashes at times.
maqleod Posted September 23, 2010 Posted September 23, 2010 (edited) It errors because he has a 2 value array and 0-ubound($aswords) is 3 values to random. Edited September 23, 2010 by maqleod [u]You can download my projects at:[/u] Pulsar Software
KurogamineNox Posted September 23, 2010 Author Posted September 23, 2010 Help fix it? Or other suggestions?
maqleod Posted September 23, 2010 Posted September 23, 2010 Local $asWords[2] = ["Boat", "Car"] MsgBox(0, "Here's a word for you", $asWords[Random(0, UBound($asWords) -1, 1)]) [u]You can download my projects at:[/u] Pulsar Software
smashly Posted September 23, 2010 Posted September 23, 2010 (edited) Hi, the net is a great place to get word lists, saves you having to write them out yourself.I used http://dictionary-thesaurus.com/Wordlists.html to get an Adjectives list.Here's what I mean give the script a second to get the word list.#Include <File.au3> Global $sFile = @ScriptDir & "\Adjectives(929).txt" Global $sFileSource = "http://dictionary-thesaurus.com/wordlists/Adjectives%28929%29.txt" Global $aWord_Adjectives, $iMsg If Not FileExists($sFile) Then InetGet ($sFileSource, $sFile) If FileExists($sFile) Then _FileReadToArray($sFile, $aWord_Adjectives) If Not @error Then Do $iMsg = MsgBox(65, "Random Adjective", StringUpper($aWord_Adjectives[Random(1, $aWord_Adjectives[0], 1)]) & @LF & @LF & "Click Ok for another word") Until $iMsg = 2 EndIf Else MsgBox(64, "Not Found", "Word file not found") EndIfCheers Edited September 23, 2010 by smashly
AlmarM Posted September 23, 2010 Posted September 23, 2010 Random words without storing them you say? This is like the closest I can get. Global $Pattern = "Xooxxo" MsgBox(0, "", "Your random word: " & _RandomWord($Pattern)) Func _RandomWord($sPattern) Local $aSplit = StringSplit($sPattern, "") Local $aXList = StringSplit("bcdfghjklmnpqrstvwxyz", "") Local $aOList = StringSplit("aeiou", "") Local $sReturn = "" For $i = 1 To $aSplit[0] If ($aSplit[$i] == "X") Then $sReturn &= StringUpper($aXList[Random(1, $aXList[0], 1)]) ElseIf ($aSplit[$i] == "x") Then $sReturn &= $aXList[Random(1, $aXList[0], 1)] ElseIf ($aSplit[$i] == "O") Then $sReturn &= StringUpper($aOList[Random(1, $aOList[0], 1)]) ElseIf ($aSplit[$i] == "o") Then $sReturn &= $aOList[Random(1, $aOList[0], 1)] EndIf Next Return $sReturn EndFunc Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
Mison Posted September 23, 2010 Posted September 23, 2010 (edited) Maybe you can use this information to create something out of nothing.. The most used letters in the English language: Top 5 - "ETAIN" Top 6 - "ETAOIN" Top .. "ETAON RISHD LFCMU GYPWB VKXJQ Z" The most common letter pairs as "TH HE AN RE ER IN ON AT ND ST ES EN OF TE ED OR TI HI AS TO" The most common doubled letters as "LL EE SS OO TT FF RR NN PP CC" http://en.wikipedia.org/wiki/Letter_frequency http://letterfrequency.org/ Edited September 23, 2010 by Mison Hi ;)
junkew Posted December 29, 2021 Posted December 29, 2021 More details will help English, German, French, Chinese, ..... language Valid existing words from a dictionary Just some characters A-Z or special letters (diacritics) in UNICODE .... FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Nine Posted August 4, 2022 Posted August 4, 2022 1 hour ago, oddssatisfy said: Do you guys know of a good random word generator besides the memocamp one? A free one if possible? Of course we can come up with this. But you will need to elaborate your requirements in clear terms. At least provide a decent runable snippet of your intentions. Then we should be able to help you out. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
AspirinJunkie Posted August 5, 2022 Posted August 5, 2022 10 hours ago, oddssatisfy said: I’ve checked the other word generators on the net but they seem to generate only one word at a time and not a list of words. https://random-word-api.herokuapp.com/word?number=10 API-Documentation: http://random-word-api.herokuapp.com/home SOLVE-SMART 1
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