Tapatalk

macro command "SaveAs" and [FILE_NAME] in template

macro command "SaveAs" and [FILE_NAME] in template

1
NewbieNewbie
1

    Aug 20, 2004#1

    Hi,

    I use a named template. Within that template I use the special variable [FILE_NAME]. This varibale is useless when I'm edititing a new file that isn't saved yet.
    Next I decided to try the macro call "Save". ( I expexted to get a "Save As" dialog. This would be equal to the behaviour when pressing the "Save" menu item). But nothing happens if you call "Save" for an unnamed file.
    "SaveAs" without using a filename leads to an error.

    So what can I do to save a "unnamed file" before someone inserts my named template.

    Thanks in advance,
    frank

    6,685587
    Grand MasterGrand Master
    6,685587

      Re: macro command "SaveAs" and [FILE_NAME] in temp

      Aug 22, 2004#2

      Try this macro. It checks if the file has no name and if so, the user is asked to enter the file name for the new file. This file name is then used to save the file. Not perfect, but a workaround for your problem.

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      IfNameIs ""
      Top
      GetString "Enter file name for new file:"
      SelectToTop
      Cut
      SaveAs "^c"
      EndIf
      Best regards from an UC/UE/UES for Windows user from Austria