Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu Jan 02, 2003 12:50 pm   

Spell Checking
 
#ALIAS scheck {#VAR wordApp %comcreate( "Word.Application");#VAR doc {@wordApp.Documents.Add()};#VAR wordApp.Selection.Text "%-1";#VAR dialog @wordApp.Dialogs(828);#CALL @dialog.Show();#IF (%len(@wordApp.Selection.Text) <> 1) {#EXEC {@wordApp.Selection.Text}} {#EXEC {"%-1"}};#VAR dialog %null;#CALL @doc.Close(0);#CALL @wordApp.Quit();#VAR wordApp %null}

Requires:
Microsoft Word installed

Usage:
scheck textToSend

textToSend is what would normally be typed if spell checking were not to occur. The script spell checks everything that comes after the name of the alias and then sends it to the MUD.

Example:
scheck chat Hello everybody!

If there are no erros in the text passed to the alias the text is sent to the MUD.

If there are errors, the standard Spelling and Grammar dialog box is shown. Clicking on Cancel will send the text to the MUD with no changes to it. Otherwise, you can change each word to one of the suggested words or ignore it. Once the changes are done the corrected text is sent to the MUD.

Notes:
  • Change the spell checking preferences by cliking on Options when the dialog box shows up.

  • If a box with some statistics keeps showing up after the corrections are made, disable the Show readability statistics option.

  • The first time the alias is used, it may take some time because Word needs to be loaded. Afterwards, it should be faster.



  • Kjata
    Reply with quote
    Edwub
    Wanderer


    Joined: 21 Nov 2002
    Posts: 85
    Location: USA

    PostPosted: Fri Jan 03, 2003 10:53 pm   
     
    I'm having syntax problems with this alias.

    #VAR doc {@wordApp.Documents.Add()}
    ^ syntax error

    Edwub the Mage
    Reply with quote
    IceChild
    Magician


    Joined: 11 Oct 2000
    Posts: 419
    Location: Post Falls, ID, USA

    PostPosted: Fri Jan 03, 2003 11:15 pm   
     
    As Kjata mentioned in the Beta forum when it was originally posted, the syntax checker doesn't like COM, just ignore the error, and it should still work fine.



    Icechild
    mv -f message.text /dev/null
    Reply with quote
    Edwub
    Wanderer


    Joined: 21 Nov 2002
    Posts: 85
    Location: USA

    PostPosted: Sat Jan 04, 2003 1:09 am   
     
    Is it perhaps version specific?
    I have 6.16 and it does the lag thing as mentioned, but no pop ups come if i typo.
    scheck say testnfhfhfhf
    | 1038H 1017M 1019V > say testnfhfhfhf


    You say, 'testnfhfhfhf'






    Edwub the Mage
    Reply with quote
    Kjata
    GURU


    Joined: 10 Oct 2000
    Posts: 4379
    Location: USA

    PostPosted: Sat Jan 04, 2003 12:42 pm   
     
    Do you have Microsoft Word installed?

    The script was made a long time ago, so it should definitely work in 6.16. You should try upgrading to 6.40, anyway. It is a lot better and free.

    Kjata
    Reply with quote
    Evangelist
    Adept


    Joined: 10 Oct 2000
    Posts: 224
    Location: USA

    PostPosted: Fri Jan 17, 2003 9:35 pm   
     
    Works great

    Evangelist/Pernius
    telnet://phidar.com:9000
    Reply with quote
    Display posts from previous:   
    Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts All times are GMT
    Page 1 of 1

     
    Jump to:  
    You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot vote in polls in this forum

    © 2009 Zugg Software. Hosted by Wolfpaw.net