--- In [email protected], "dedebaykus" <[EMAIL PROTECTED]> wrote:
>
> I am trying to create an action whcih can create a file from
> clipboard. This is simply possible. However I do not want to define
> prior file name. I simply want file to be created with todays date or
> clipboard content.
>
> any ideas?
>
file.writeall(?"c:\folder\"++date++time", clip.get)
- if you are going to write more that one file per second, then the
above needs to change to avoid overwriting; e.g. add counter to file
name
- you can get the first line of clipboard with
local clip1=line(clip.get, 1)
but before you use as a file name you have to make sure it has no ""
and does not contain any invalid chars for file names; replacechars can
help, something like
clip1.=replacechars("+/\?*=","_")
Or use regexps (but of course, there is always this concern:
http://regex.info/blog/2006-09-15/247