on beginSprite me
pWhichSprite = sprite(me.spriteNum)
pWhichMember = pWhichSprite.member
pMemberType = pWhichMember.type
end
on keyDown me
if (the commandDown) then
case (TRUE) of
(the commandDown AND the keyPressed = "x") : clipboardCut me
end case
else
pass
end if
end
on clipboardCut me
if pMemberType = #text then
whichSelection = member(pWhichMember).selection
if whichSelection[1] + 1 <> whichSelection[2] then
put pWhichMember.selectedText.text into member("clipboard temp")
delete member(pWhichMember).char[whichSelection[1] + 1..whichSelection[2]]
copyToClipboard member "clipboard temp"
else
beep
end if
end if
if pMemberType = #field then
whichSelection = the selection
if the selStart<> the selEnd then
put the selection into member("clipboard temp")
a = the selStart
b = the selEnd
put char a + 1 to b of the text of member pWhichMember into member("clipboard temp")
delete char a + 1 to b of member pWhichMember
copyToClipboard member "clipboard temp"
else
beep
end if
end if
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA