hello list
I'd want to copy (cut) and paste some colored and fontstyled text using
a menu or command(control)+ C,X,V. I tried a lot with .rtf but without
any success. Do you know something faster than this ?:
-- simplified ;-)

global malistecouleur,malistefontstyle

case (TRUE) of
(the commandDown AND the keyPressed = "x"), (the commandDown AND the
keyPressed = "c") :
          analysecouleurCoupe
          analysefontstyleCoupe

      (the commandDown AND the keyPressed = "v") :
           colorisecollage
           fontStylisecollage
end case


on analysecouleurCoupe
longueurselection= the number of chars of the text of the selectedText
of member "texte"
malistecouleur = []
repeat with a = 1 to longueurselection
addat malistecouleur, (member"texte").selectedText.char[a].color
end repeat
end analysecouleurCoupe

on analysefontstyleCoupe
longueurselection= the number of chars of the text of the selectedText
of member "texte"
malistefontstyle = []
repeat with a = 1 to longueurselection
addat malistefontstyle, (member"texte").selectedText.char[a].fontstyle
end repeat
end analysefontstyleCoupe

on colorisecollage
longueurselection= the number of chars of the text of the selectedText
of member "texte"
repeat with a = 1 to longueurselection
(member"texte").selectedText.char[a].color = getat(malistecouleur,a)
end repeat
end colorisecollage

on fontStylisecollage
longueurselection= the number of chars of the text of the selectedText
of member "texte"
repeat with a = 1 to longueurselection
(member"texte").selectedText.char[a].fontstyle =
getat(malistefontstyle,a)
end repeat
end fontStylisecollage

Thank you very much for your ideas!
Jean-louis Valero


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to