Tab char doesn't work

Bill Vlahos bvlahos at
Sat Aug 7 18:14:50 EDT 2010

I want to intercept a paste command to replace any tabs or returns in it with spaces so they don't get pasted into a table object. The script below works for returns but not tabs. Notice that color of the word tab is not even the same as the color of the word return. It is like the tab character isn't being recognized.

on pasteKey -- replace returns and tabs with spaces before pasting for attachments description (actually any table)
   if word 2 of the target begins with "revCell-" then
      set the clipboardData["text"] to replaceText(the clipboardData["text"],return,space)
      set the clipboardData["text"] to replaceText(the clipboardData["text"],tab,space)
   end if
end pasteKey

I put this script into a frontscript.

Bill Vlahos
InfoWallet ( is about keeping your important life information with you, accessible, and secure.

More information about the Use-livecode mailing list