Page 1 of 1

Mac Spell Check?

Posted: Sun Feb 20, 2011 4:52 pm
by PBH
Hi,

Although I've had RunRev/LiveCode for some time I've only just dabbled a little, but now I'm trying to create a small text processing app (mainly to use on a Mac) and it would be nice to be able to access the Mac Spell Check and Thesaurus in a similar way that most other apps do, ie. under the edit menu or contextual menu. I've searched the forum and user guide etc., but I can't find any info on how to do this, so my questions are:

1. Is this easy to achieve?
2. Is there any documentation available for guidance?

I'd really appreciate if someone could point me in the right direction.

Thanks.

Paul

Re: Mac Spell Check?

Posted: Sun Feb 20, 2011 10:01 pm
by townsend
Check out RunRevPlanet_com's Spell Check for LiveCode.

It works in Mac, Windows and Linux environments.

Re: Mac Spell Check?

Posted: Mon Feb 21, 2011 9:31 am
by PBH
Thank you for the suggestion, I'll keep that in mind for now, but unfortunately it doesn't appear to have a Thesaurus.

I was hoping to be able to access the built-in Mac Services.

Thanks again.

Paul

Re: Mac Spell Check?

Posted: Mon Feb 21, 2011 4:06 pm
by shaosean
you can access the built-in spell checking with an external..

Re: Mac Spell Check?

Posted: Mon Feb 21, 2011 6:35 pm
by mcgrath3
You can create an automator app and run that. I just tried it and it works.
  • Open automator.
    Create a new "Application"
    drag "Get Contents of Clipboard" over to the workflow area to the right
    drag "Get Definition of Word" over next
    Select "Oxford American Writer's Thesaurus" in the Dictionary btn of "Get Definition of Word"
    drag "Copy to Clipboard" over last
    save as an application "ThesaurusClipboard".
In LC create one button "Get Thesaurus" and two fields "Text" and "Thesaurus Results"

Code: Select all

on mouseUp
    put the selectedChunk into tTemp
    put word 2 of tTemp into tChar1
    put word 4 of tTemp into tChar3
    put character tChar1 to tChar3 of field 1 into tChunk
    copy
    launch "/Users/yournamehere/Desktop/ThesaurusClipboard.app"
    wait 6 seconds with messages
    focus on field "Thesaurus Results"
    paste 
end mouseUp
This works and pastes the results from the Dictionary app into LiveCode.

HTHs

Tom

Re: Mac Spell Check?

Posted: Mon Feb 21, 2011 8:31 pm
by PBH
Thank you for the replies.

Thank you very much Tom for the code example, I really appreciate you taking the time to work that out, I'll certainly give it a go.

Paul