Top

Anagram Solver (Unscrambler)


mIRC Code
+ 1 likes
Please Register to submit score.
Bookmark and Share
Average Score  6.0 (of 2 scores)
Date Added  Dec 22, 2008
Last Updated  Mar 01, 2009
Tags  acronym  anagram  kirby  scramble  solver  unscramble 

Introduction

Another little dialog for solving scrambled text.

To launch it, either type in /anagram or right-click a window and hit 'Anagram Solver'.

Type in a word (as shown below) into the edit box, and hit 'Solve!' to unscramble the text.
All possible results will be listed in the list box.
Scrambled text can be left separated, for example, T A E, instead of TAE.

Here's a picture:


Enjoy! :D

Grab the Code

alias -l solve { if (!$sock(anagram)) { sockopen anagram www.ssynth.co.uk 80 | sockmark anagram $replace($1-,$chr(32),$chr(43)) } }
alias -l htmlfree { var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;) | return %x }
dialog anagram {
  title "Anagram Solver"
  size -1 -1 100 122
  option dbu
  edit "", 1, 10 11 79 10, autohs
  box "Anagram:", 2, 6 4 87 20
  list 3, 12 34 75 61, size
  box "Possible Words:", 4, 6 26 87 75
  button "Solve!", 5, 12 106 37 12
  button "Close", 6, 52 106 37 12
}
alias anagram dialog $iif($dialog(anagram),-v,-m) anagram anagram
menu * {
  Anagram Solver : anagram
}
on *:dialog:anagram:*:*: { if ($devent == sclick) { if ($did == 5) { did -b $dname 5 | solve $did(1) } | if ($did == 6) { dialog -x $dname $dname | unset %anagram* } } | if ($devent == edit) && ($did == 1) { did $iif($did(1).text,-e,-b) $dname 5 | did -r $dname 3 } }
on *:sockopen:anagram: { sockwrite -n $sockname GET http://www.ssynth.co.uk/~gay/cgi-bin/nph-an?line= $+ $sock($sockname).mark $+ &words=1&dict=antworth&doai=on HTTP/1.0 | sockwrite -n $sockname Host: www.ssynth.co.uk $+ $crlf $+ $crlf }
on *:sockread:anagram: { if ($sockerr) { echo -a * There was a problem retrieving data from the website. Please try again. } | else { window -h @anahide | sockread %anagram | if (<pre> isin %anagram) { while (</pre> !isin %anagram) { didtok anagram 3 32 $htmlfree(%anagram) | echo @anahide $htmlfree(%anagram) | sockread %anagram } } } | window -C @anahide }
on *:sockclose:anagram: { if ($dialog(anagram)) { did -e anagram 1 } }

Comments

  (14)  RSS
Aucun50
Comments: 548
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Dec 22, 2008 11:21 pm
I found a problem:
* /echo: insufficient parameters (line 65, script4.txt)

I tried using "wrodasps" it gave me password but that error.

Kirby
Comments: 475
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Dec 23, 2008 2:15 pm
Aucun50 said:
Quote:
I found a problem:
* /echo: insufficient parameters (line 65, script4.txt)

I tried using "wrodasps" it gave me password but that error.

I had two other people test this and they didn't have that error.
What version of mIRC are you using Aucun?
Aucun50
Comments: 548
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Dec 23, 2008 3:03 pm
I'm using 6.32.
Blitzjager
Comments: 193
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Dec 23, 2008 3:06 pm
I'm using 6.31 and using "wrodasps" I don't get an error. :X
Guess it could be annoying but it doesn't stop the the script from working, right?
Aucun50
Comments: 548
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Dec 23, 2008 3:14 pm
The script works fine still just wont to point that out, Good job btw.
CharltonJ
Comments: 44
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Dec 24, 2008 10:42 am
Works good, good job =]
Noutrious
Comments: 365
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Jan 12, 2009 1:14 pm
This could be easily done without sockets in about 50% less lines.
Kirby
Comments: 475
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Jan 12, 2009 8:07 pm
Quote:
This could be easily done without sockets in about 50% less lines.
That's great. If you think it could be easily done, show me.
Kirby
Comments: 475
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Jan 19, 2009 3:33 pm
Changed edit-box so it automatically scrolls horizontally since some words may be longer than others.
Kirby
Comments: 475
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Mar 1, 2009 10:15 pm
Made some drastic changes to it.
The script should work twice as fast now.
Aucun50
Comments: 548
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Mar 1, 2009 10:51 pm
I don't see a difference
Kirby
Comments: 475
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Mar 2, 2009 7:16 am
Really?
I tried the old one on a broken mIRC running on Wine and took about 10 seconds to finish.
This one now takes only 1 or 2 seconds.

Oh well.
Aucun50
Comments: 548
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Mar 2, 2009 7:36 am
My comp is fast so
Kirby
Comments: 475
 
mIRC Snippet:  Anagram Solver (Unscrambler)
Posted on Mar 2, 2009 7:40 am
Eh, maybe it doesn't increase the speed to a noticeable amount, but I have removed some variables and the use of tokens that should make it faster.

My computer is slow, but I like it. :( :)

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom