Announcement

Collapse
No announcement yet.

Scrollable text screen

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scrollable text screen

    I've just purchased Setup Factory 6.0 and already have a dumb question.

    How do I have SF insert the text from a (Notepad) file into the body of the Scrollable Text screen? I want to display readme type information, and I don't want to have to manually update the screen each time I build a release. I just want SF to insert the current contents of a nominated text file.

  • #2
    Re: Scrollable text screen

    That's easy.

    Just add a Read Text File action to the Startup tab (click on the Actions icon in the shortcut bar, then click on the Add button, then select Read Text File from the Text Files category).

    Rename the default custom variable (%FileReadVar%) to something else if you want, and edit the path in the File name field so it leads to where the file will be at run time.

    Then, go to the Custom tab of the properties dialog for the Scrolling Text screen, and replace the default text ("Insert your text here...") with the custom variable you specified in the Read Text File action.

    If any of this variables stuff confuses you, just read chapter 2 and chapter 14 in the User's Guide.
    --[[ Indigo Rose Software Developer ]]

    Comment


    • #3
      Re: Scrollable text screen

      Thank you. That makes sense.

      Comment


      • #4
        Re: Scrollable text screen

        There's an important point that I should mention, though:

        The method I described assumes that the file already exists on the user's system...if it's a file you're installing, that won't be the case until after the files are installed.

        Of course, there is a way that you can get around this:

        Add the text file to your project as a Primer file (see page 43 in the User's Guide) so it will be extracted right at the beginning of the installation process, and read it in from %TempLaunchDir%\yourfilename.txt. (Remember to delete this file from %TempLaunchDir% with a Delete File action on the Shutdown tab, too...SF6 doesn't automatically clean up Primer files at the end of the setup.)
        --[[ Indigo Rose Software Developer ]]

        Comment


        • #5
          Re: Scrollable text screen

          Yes. When I thought about it, I realised that your solution worked at installation time, so the file would need to be available.

          What I am really trying to achieve is to have the text inserted into the form at build time. I could do this with other installers I have used over the years (Eschalon and Installshield Express), so I thought there must be some way yo do it in SF.

          If not, it is not difficult to implement it as you describe - the text file can exist separately on the CD if it must.

          I would like to do the same with the licence form, and I see I will have to take the same approach.

          If there is no way to do this at build time, perhaps these forms should have an option added to load the text from a file?

          Comment


          • #6
            Re: Scrollable text screen

            Yeah, I was thinking the same thing as I wrote my second post. But we're sailing into "maybe version 7" territory there.

            Another method you could try is to use the unattended build (/B) command line option to assign the text to a design-time constant. This wouldn't be quite as straightforward, though, since the text would need to be formatted (or reformatted) to fit on a single line (i.e. to make the text an INI file entry).
            --[[ Indigo Rose Software Developer ]]

            Comment


            • #7
              Re: Scrollable text screen

              I'll go with your first suggestion. I'll see if I can put the readme and licence text files on the CD as separate files, and reference them from there into variables.

              It will actually be good to have these files on the CD, so that the user can look at them before installing.

              I'll post a suggestion to the 'New Features' forum re design time options.

              Thanks for your help. It's good for a newcomer to receive such good service!!

              Comment

              Working...
              X