Re: Tab char doesn't work

2010-08-07 Thread Bill Vlahos
Sorry the actual script is:

on pasteKey -- replace returns and tabs with spaces before pasting for 
attachments description (actually any table)
   if the target contains 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
   paste
end pasteKey

Bill Vlahos
_
InfoWallet (http://www.infowallet.com) is about keeping your important life 
information with you, accessible, and secure.

On Aug 7, 2010, at 3:14 PM, Bill Vlahos wrote:

 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
   paste
 end pasteKey
 
 I put this script into a frontscript.
 
 Bill Vlahos
 _
 InfoWallet (http://www.infowallet.com) is about keeping your important life 
 information with you, accessible, and secure.
 
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Tab char doesn't work

2010-08-07 Thread Jim Ault
'tab' is a keyword, but not a command , 'return' is a command in a  
function and will be a different color


'space' and 'tab' should be the same color, just as 'comma'.

Try the simple 'replace tab with space in var
--
get the clipboardData[text]
replace tab with space in IT
set the clipboardData[text] to IT
--
   since replaceText is expecting a regEx string.
I think you need to escape the tab char for the string to work


On Aug 7, 2010, at 3:14 PM, Bill Vlahos wrote:

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
  paste
end pasteKey

I put this script into a frontscript.



Jim Ault
Las Vegas



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution