This content has been marked as final. Show 7 replies
> However, the paste function I want to do is, just like in any other app, paste
> text into an existing block of text (could be empty text) but paste it where
> the cursor is in the text member. Does anyone know how to paste text into the
> cursor location of a text member?
Have you tested this as a projector?
Once you have _movie.editShortCutsEnabled = 1 (which defaults to TRUE if
unaltered) you can copy a selection to the clipboard and paste the
clipboard into the keyboardFocusSprite without having to do any
Well, not really. Im still having issues with the writing of the handler itself. I planned on using the Buddy API's CopyText/PasteText functions to create the Copy and Paste functions in a typical "Edit" drop down menu item. But I have to know what sprite has the selected text so that I can send that to the BuddyAPI CopyText function.
Same thing goes for Pasting text. I need to know which editable text member to paste into.
Unless Im totally missing something here...which could be very possible :)
I'm suggesting to you that you don't need to write any code and attach
it to anything. If your text members are editable, copy-and-paste should
just work; so I'll again suggest you test this *as a projector*
Yes, Copy/Paste using Ctrl+C or Ctrl+V does work in the projector but the end-user also wants drop-down menu selections for those 2 functions.
How do I have director perform a Ctrl+C or Ctrl+V from a menu item?
you could do it a couple of ways:
1. baSendKeys("^C") for Copy and baSendKeys("^V") for Paste.
2. member(x).pasteClipBoardInto()... you can use keyboardFocusSprite, just test whether there's a text member with focus:
focusSpriteNum = _movie.keyboardFocusSprite
if focusSpriteNum <> -1 then
mem = sprite(focusSpriteNum ).member
3. Use Valentin's Clipboard Xtra: http://staff.dasdeck.de/valentin/xtras/clipboard/
4. Use a combination of all three options listed above.
Well, IT WORKS!!!
HOORAY for Chunick!
I used a combination of #2 and #3 above. Works very well.
I tried the buddy api command but it liked dropping a "C" in for the baSendKeys("^C") command and a "V" in for the baSendKeys("^V") command.
Thanks again for all your help Chunick and Sean. It is much appreciated! :)
the buddyAPI docs suggest not to use CAPS for the letters as it might be interpreted by some programs as CTRL+SHIFT+C instead of CTRL+C.... so you can always try "^c" as per the docs.