How to start this project...

Martin Blackman martinblackman at
Sun Oct 1 12:05:15 EDT 2006

Hi Adrian
I don't fully understand what you're asking but you can check the
cursor location with the selectedchunk property. eg. the following
field script might be a starting point for replacing your before char:

on keydown
    put word 4 of the selectedchunk of me into beforecharpos
    put Lookupchar(char beforecharpos of me) into newbeforechar
    put newbeforechar into char beforecharpos of me
    pass keydown
end keydown


On 01/10/06, Adrian Williams <adrian at> wrote:
> I'm new to Revolution (using 2.7.3 trial on Mac OS X)
> and want to create both Mac+Win programs of the solution.
> In a text field I want the User to enter text.
> The useUnicode will be set to true for a double-byte font which
> will be developed with special characters.
> (Although I want to test this with any single-byte first).
> As the User types each letter from the keyboard I need the program to:
> 1. check which (if any) letters are BEFORE the cursor/insertion point
> 2. check which (if any) letters are AFTER the cursor/insertion point
> 3. REPLACE beforeCharacter, enteredCharacter and afterCharacter
> from a table that has been prepared in advance.
> For example, as the User enters text;
> ABCDE is entered but needs to be replaced with additional characters -
> AggBhhC
> Once entered, it may need to be corrected;
> AggBhhC is already on-screen.
> User places insertion point somewhere in the word and begins
> entering more text, which again, must refer to the table for
> replacement.
> I've looked at the relevant ways I think it should be done but as I'm
> completely new to Rev, this is just beyond my scope at the moment.
> A starting point would be very helpful if anyone can assist?
> Thanks,
> Adrian Williams
> "Club Type"
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list