on ur dialog like ur bot script: again no need to set global vars and ur dialog don't work.
if you want to turn it into a dialog
you could do something like this
dialog spc {
title "Spell"
size -1 -1 79 69
option dbu
box "Enter 1 Word To Check:", 1, 2 2 76 20
edit "", 2, 4 10 48 9, autohs left
button "Check", 3, 54 10 22 9, flat
box "Outcome", 4, 2 23 76 45
list 5, 4 32 48 34, size vsbar
button "Clear", 6, 54 32 22 9, flat
button "Copy", 7, 54 44 22 9, flat
button "Exit", 8, 54 56 22 9, flat ok
}
on *:load: {
echo 12 -a You Have Just Loaded Napa182's SpellChecker Dialog
echo 12 -a A Script0rs Inc. Production
echo -a 14,1(14,1¯15,1¯0,1¯0,1º $+($chr(171),$chr(164),$chr(88),$chr(167),$chr(199), $&
$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187)) º0,1¯15,1¯14,1¯) $+ $chr(153)
}
menu menubar,channel {
.Spell Checker:{ dialog $iif($dialog(spc),-v,-md) spc spc }
}
on *:dialog:spc:init:0:{ did -b spc 3,6-7 }
on *:dialog:spc:edit:2:{
did -e spc 3,6-7
if ($chr(32) isin $did(2).text || $did(2).text !isalpha) { did -r spc 2 | noop $input(Please Enter Only One Word No Space's And No Numbers,uhdo,ERROR!) }
}
on *:dialog:spc:sclick:*: {
if ($did == 3) {
did -r spc 5
if ($sock(spell)) sockclose spell
sockopen spell www.spellcheck.net 80
sockmark spell $did(2).text didtok spc 5 32
}
if ($did == 6) { did -r spc 2,5 | did -b spc 3,6-7 }
if ($did == 7) { clipboard $did(5).seltext }
}
on *:sockopen:spell: {
sockwrite -nt $sockname GET $+(/cgi-bin/spell.exe?action=CHECKWORD&string=,$gettok($sock(spell).mark,1,32)) HTTP/1.1
sockwrite -nt $sockname Host: $+(www.spellcheck.net,$str($crlf,2))
}
on *:sockclose:spell: { $gettok($sock(spell).mark,2-,32) }
on *:sockread:spell: {
var %spell | sockread %spell
if ($regex(%spell,/<BR><BR><.+<B>(.+correctly.)<\/B><\/font><P><BR>/)) { $gettok($sock(spell).mark,2-,32) $regml(1) | sockclose spell }
if ($regex(%spell,/^(\w+)<BR>$/)) { sockmark spell $addtok($sock(spell).mark,$regml(1),32) }
}