[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[StrongED] Filer problem. Was: Regular Search and Replace on a key?



On 30 Jan 2010  Gavin Wraith <gavin@xxxxxxxxxxxxxxx> wrote:

[snip]

> What I wrote was the function, not the script. For the script we need
> to know to which strings in your StrongED window you want to apply the
> function. If to all strings then try this script:

> #! lua
> do
> local lines in io
> local slashdot = \(s)
>       local slash,dot,pat = '/','.','[%./]'
>       local swap = { [slash] = dot, [dot] = slash }
>       => (s:gsub(pat,swap)) end -- function
> for line in lines(arg[1]) do print(slashdot(line)) end -- for
> end -- do

This seemed to me to be a useful script, so I copied it into a 
temporary directory, and confirmed that it did the business; many 
thanks, Gavin.

I then opened the internal scripts directory, 
!StrongED.Defaults.Tools.!ScriptSED.Scripts
from the scripts icon at the top of a StrongED window, and tried to 
copy the script into this directory. I got a, to me, totally 
incomprehensible error message, presumably from the filer, "Path 
variable had multiple entries and was used for a write operation." Any 
simple explanation of this, please, Fred? Mere idle curiosity! :-)


I then copied it without problem to another directory where I keep 
scripts.

With best wishes,

Peter.

-- 
Peter, \  /      zfc Yb       \     Prestbury, Cheltenham,  Glos. GL52
Anne    \/ __            __    \                              England.
and     / /  \ | | |\ | /  _    \      http://pnyoung.orpheusweb.co.uk
family /  \__/ \_/ | \| \__/     \______________ pnyoung@xxxxxxxxxxxx

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx