Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)



Hi,

it will come as no surprise to you from the below that I am new to AS. Having got that off my chest, my question is as follows:

We are 4D developers of medical practice applications that run on OS9, OSX and Windows. Our Mac clients are migrating fairly rapidly to OSX which leads to my problem - spell checking. 4D is a carbon app that doesn't give access to OSX services so one can't use the spell service. I had the idea of getting 4D copy the styled text in 4D Write, call an AS application which pastes the styled text into a text field then runs the spelling service to correct the text. At completion, the user would press a button in the AS app that copies the corrected text and then sends an AppleEvent back to 4D which then pastes the corrected text, still styled hopefully, back into 4D Write.

I can get the AS app on startup to paste plain text with the following code

on awake from nib theObject
tell the window of theObject
if the name of theObject is "text_fld" then
set the contents of text view "text_fld" of scroll view "text_fld" to the clipboard
end if
end tell
end awake from nib

Question 1. I can copy and paste styled text manually into the text field. How do I do it programmatically?

Q2. Is there a programmatic way of getting the spelling service to check the pasted text?

Q3. Is copying the corrected styled text is the reverse of the answer to Q1?

Many thanks,

Cheers,

Bill
---------------------------------------------------------------
Dr Bill Kelly
DoctorWare - Developers of SmartRooms
Medical Practice Management Software for Macintosh & Windows
PO Box 2126, East Ivanhoe VIC Australia 3079
Intl phone: 61-3-9499-4622 fax: 61-3-9288-4487
email: email@hidden
---------------------------------------------------------------
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.