Sign in to follow this  
Followers 0
Szhlopp

Spellcheck in your GUI

1 post in this topic

#1 ·  Posted (edited)

Hey Autoit forum members!

So it's been a while since I've posted anything, but I feel like I should share this one ;)

Spellchecking that WORKS! Finally a really easy and simple way to add spellchecking to a GUI. Looks nice, feels comfortable, and is completely editable(the appearance).

How does it works?

Googiespell and Google have provided an awesome way to integrate a multilingual spellcheck textbox into any standard html page. Using an embedded browser and custom made html document(done in expression web 4), it makes a really nice looking spellcheck to use in your gui. Try it out!

ZIP contains:

Spellchecksample.au3 <-- The autoit script, duh

SpellChecker.html <-- The custom html page(edit this to change colors / look and feel)

Googiespell(folder) <-- All of the Javascript, images, and other random crap Googiespell has provided us with.

Enjoy! If you have any questions or comments feel free to ask.

SpellCheck.zip

(READ! This is free to use if NOT for commercial purposes)

Licensed under Creative Common Non Commercial license: http://creativecommons.org/licenses/by-nc-sa/3.0/

to buy a LICENSE for commercial use: http://orangoo.com/labs/GoogieSpell/

--Making changes to spellchecker--

Q. How do I add more languages?

A. Under spellchecker.html, you can add or remove any of these languages:

googie2.setLanguages({"da": "Dansk", "de": "Deutsch", "en": "English",

"es": "Español", "fr": "Français", "it": "Italiano",

"nl": "Nederlands", "pl": "Polski", "pt": "Português",

"fi": "Suomi", "sv": "Svenska"});

Q. How do I change the colors of the spellchecker?

A. Googiespell.css is a stylesheet. Want to change the way it appears when the spelling is 'okay'?

.googie_check_spelling_ok {

color: white;

background-color: green;

padding-left: 2px;

padding-right: 2px;

cursor: pointer;

}

There are a few inpage styles for looks as well(spellchecker.html),

body {
            margin: 0px;
            background-color: #FFFFFF;
        }
        h1, h2 {
            font-size: 18px;
            font-family: verdana, helvetica, sans-serif;
            color: #333;
            margin: 0px;
            padding: 0px;
            padding-bottom: 10px;
        }

        h3 {
            font-size: 14px;
            color: #333;
            margin: 0px;
            padding-top: 15px;
            padding-bottom: 2px;
        }

        pre {
            margin-top: 5px;
            padding: 4px;
            background-color: #e3e2c6;
            border: 1px solid #999;
        }

        .textarea {
            /*    START GoogieSpell reqs.*/
            line-height: 13px;
            font-size: 13px;
            padding: 0px;
            font-family: sans-serif;
            /*    END GoogieSpell reqs.*/

            width: 400px;
            height: 300px;
        }

        .inputbox {
            /*    START GoogieSpell reqs.*/
            line-height: 13px;
            font-size: 13px;
            padding: 2px;
            font-family: sans-serif;
            /*    END GoogieSpell reqs.*/

            width: 200px;
        }

Getting and setting the data:

Func GuiCtrlIERead()
    Return _IEPropertyGet($oTextArea, "innertext")
EndFunc

Func GuiCtrlIESet($string)
    _IEPropertySet($oTextArea, "innertext", $string)
EndFunc

The default text is stored in the HTML:

<textarea id="ta2" class="textarea" style="border: 0px">Ths is a tst</textarea>
Edited by Szhlopp

Share this post


Link to post
Share on other sites



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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0