Zulu Translator via sockets - 21/07/08 12:22 PM
Heya, I posted a question about this script earlier, but i got it working so deleted the original post.
So now that i have the following script working:
i want to add it into a on TEXT script to automatically replace words. So i was thinking i need a $zulu(wordhere) in a while loop to achieve this, but im not entirely sure how to get it to $zulu(wordhere). Any ideas? Once i have that part done, im sure i could continue. Might still set the last line of text as a variable and /sF8 Alias here to convert the last line spoken if it is in the language zulu.
Any other suggestions or ideas?
So now that i have the following script working:
Code:
alias zulu { sockopen zulu isizulu.net 80 set %message query= $+ $urlencode($1) } on *:sockopen:zulu: { sockwrite -n zulu POST / HTTP/1.1 sockwrite -n zulu Host: www.isizulu.net sockwrite -n zulu User-Agent: HTTPTool/1.1 sockwrite -n zulu Referer: http://www.isizulu.net/ sockwrite -n zulu Content-Type: application/x-www-form-urlencoded sockwrite -n zulu Content-Length: $len(%message) sockwrite -n zulu sockwrite -t zulu %message } on *:sockread:zulu:{ if ($sockerr) { echo -a Error. halt } else { var %zulu sockread %zulu if (*<tr><td class="bglightgrey"*</a></td></tr>* iswm %zulu) { aecho $htmlfree(%zulu) sockclose zulu halt } if (*<p class="center">No entries found for* iswm %zulu) { aecho 4Null sockclose zulu } } }
i want to add it into a on TEXT script to automatically replace words. So i was thinking i need a $zulu(wordhere) in a while loop to achieve this, but im not entirely sure how to get it to $zulu(wordhere). Any ideas? Once i have that part done, im sure i could continue. Might still set the last line of text as a variable and /sF8 Alias here to convert the last line spoken if it is in the language zulu.
Any other suggestions or ideas?