Loading ...
Sorry, an error occurred while loading the content.

14326Re: [Clip] automatic naming of files

Expand Messages
  • Jefry S
    Oct 11, 2005
    • 0 Attachment
      hsavage wrote:

      >tuxtyro wrote:
      > > Greetings from a newcomer to the group and a programmer-wannabe. In
      > > the ubiquitous MS Word, when 'Save As' is selcected the beginning text
      > > of a file is offered as a suggested file name. What do i substitute
      > > for <NoName%0.2d> to get the same result from NoteTab? I've tried
      > > different variations on FileName and failed. It's got to be a simple
      > > coding thing, but i'm lost. I'm currently trying to teach myself Java
      > > and C, but my LAST programming was Fortran and RPG in 1970. Yeah,
      > > yeah, no comments, now. {8^)
      > > TIA
      >Have you resolved your requirement for using the first text line for the
      >'^!Save AS Filename' to save files to.
      >If you're interested I've constructed 2 clips, one uses the entire first
      >as the filename, the second uses a user pre-set number of words in the
      >first line as the filename.
      >Both clips scan the selected filename for forbidden characters
      >(characters dos and windows won't allow to be used in filenames and
      >foldernames) and replaces those characters with a dash. If the proposed
      >filename has no restricted characters it saves the file without
      >Word does it slightly differently, it stops the proposed filename at the
      >first incidence of a forbidden character.
      >Either clip can be modified to display the rename dialog with the
      >appropriate text entered as the potential filename. This allows editing
      >before the final save.
      >To make either clip most useful you should add whichever to a Personal
      >ToolBar so it's readily available without having to find and focus the
      >clipbook containing the clip.
      >Let me know.
      >hrs > hsavage@...
      Thanks, but i'm still having problems. I'm using this clip-

      H="Save As First Line"
      ; edit next line to reflect your starting_folder' preference
      ^!Set %path%=^?{(T=D)Choose Path To Save Files=D:\My Documents\NoteTab\}
      ^!Set %line1%=^$GetLine(1)$
      ^!Save AS "^%path%^%line1%.txt"

      when i leave H= intact, i get an error message of-
      Cannot create file D:\My Documents\NoteTab\four score and seven years
      agoH="Save AsFirst Line" - it inserts the H= line at the end of the line
      a semicolon to stop the line gives the desired result and parks the file
      in \NoteTab\
      I'll remove Notetab and put it in My Docs. That still doesn't quite give
      me the option of selecting location to save, like Word does, but it's
      closer. Thanks, i'll have to continue to explore and experiment to get
      the desired result. Any clue as to how to prompt for input to choose
      Thanks again, this is fun!


      The most important thing to remember in Chemistry is, 'don't lick the spoon'.
    • Show all 11 messages in this topic