Open text doc. and save to Desk Top

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Bruce
    Indigo Rose Customer
    • Jun 2001
    • 2134

    Open text doc. and save to Desk Top

    OK…. My client would like to have the results of their test (Tiggs) to be copied to a .txt doc and then save that .txt to the end users Desk Top. Hummmm any ideas?
  • Lorne
    Indigo Rose Staff Member
    • Feb 2001
    • 2729

    #2
    Re: Open text doc. and save to Desk Top

    I have three words for you:

    <ol type="1">[*]Text File - Write[*]%Desktop% (or %DesktopNT%)[*]RTFM [img]/ubbthreads/images/icons/smile.gif[/img][/list=a]
    --[[ Indigo Rose Software Developer ]]

    Comment

    • Bruce
      Indigo Rose Customer
      • Jun 2001
      • 2134

      #3
      Re: Open text doc. and save to Desk Top

      RTFM? [img]/ubbthreads/images/icons/tongue.gif[/img]

      Comment

      • Bruce
        Indigo Rose Customer
        • Jun 2001
        • 2134

        #4
        Re: Open text doc. and save to Desk Top

        LOL Ok... One word:
        WHAT! lol. how about just a few more words.
        Here's what I have going on:
        I need from the test...
        %SelectedAnswers%
        %FinalScore%
        and a date of some kind on the text file. I tried your three word answer but it didn't fly for me. Where do I put your info, which boxes?
        Thx Lorne.

        Comment

        • Brett
          Indigo Rose Staff Member
          • Jan 2000
          • 2001

          #5
          Re: Open text doc. and save to Desk Top

          Bruce,

          How about:

          %Date% = System.GetDateTime ( "Date", "North American Date")
          %TextFileData% = "%Date% %SelectedAnswers% TOTAL: %FinalScore%"
          TextFile.Write ("%Desktop%\TestResults.txt", "%TextFileData%")

          or in cut-and-pastable code:

          <IR_ACTIONS_LIST>
          <Action name="Get Date Time">
          <Type>139</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>2</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <Variable>%Date%</Variable>
          <ReturnType>0</ReturnType>
          <Date>0</Date>
          <Time>0</Time>
          </Action>
          <Action name="Set Value">
          <Type>6</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>2</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <Variable>%TextFileData%</Variable>
          <Value>%Date%
          %SelectedAnswers%
          TOTAL: %FinalScore%</Value>
          <Evaluate>0</Evaluate>
          </Action>
          <Action name="Write">
          <Type>32</Type>
          <Function>0</Function>
          <DTIndentLevel>0</DTIndentLevel>
          <Enabled>1</Enabled>
          <ErrorHandling>
          <UserNotificationMode>2</UserNotificationMode>
          <CustomErrorMessage/>
          <OnErrorAction>0</OnErrorAction>
          <JumpToLabel/>
          </ErrorHandling>
          <FileName>%Desktop%\TestResults.txt</FileName>
          <DataToWrite>%TextFileData%</DataToWrite>
          <IfFileExists>0</IfFileExists>
          </Action>
          </IR_ACTIONS_LIST>

          Comment

          • Bruce
            Indigo Rose Customer
            • Jun 2001
            • 2134

            #6
            Re: Open text doc. and save to Desk Top

            Ooook I see now...I'm brain dead! Thx

            Comment

            • Lorne
              Indigo Rose Staff Member
              • Feb 2001
              • 2729

              #7
              Re: Open text doc. and save to Desk Top


              RTFM?
              It's short for Read The F... Manual. In this case, I meant it in an entirely friendly way, since I didn't have time to provide a full explanation or a complete example, but could only point you in the general direction of the answer, the details of which you could figure out by reading the f...well, you get the idea. [img]/ubbthreads/images/icons/smile.gif[/img]
              --[[ Indigo Rose Software Developer ]]

              Comment

              • Bruce
                Indigo Rose Customer
                • Jun 2001
                • 2134

                #8
                Re: Open text doc. and save to Desk Top

                LOL Frick'in frack'in!

                Comment

                • TJ_Tigger
                  Indigo Rose Customer
                  • Sep 2002
                  • 3159

                  #9
                  Re: Open text doc. and save to Desk Top

                  Being an Instructor I usually use the RTFM in my classes as an "If all else fails . . ." scenario.

                  I however change the well known version of RTFM to mean

                  Read The Free Manual as all of the manuals for our products ship on the CD with the product. :-)
                  TJ-Tigger
                  "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                  "Draco dormiens nunquam titillandus."
                  Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                  Comment

                  • Bruce
                    Indigo Rose Customer
                    • Jun 2001
                    • 2134

                    #10
                    Re: Open text doc. and save to Desk Top

                    Lorne-
                    Is there a way in AMS to confirm if I should use one or the other?

                    Comment

                    • Lorne
                      Indigo Rose Staff Member
                      • Feb 2001
                      • 2729

                      #11
                      Re: Open text doc. and save to Desk Top

                      One or the other what? [img]/ubbthreads/images/icons/smile.gif[/img]
                      --[[ Indigo Rose Software Developer ]]

                      Comment

                      • Bruce
                        Indigo Rose Customer
                        • Jun 2001
                        • 2134

                        #12
                        Re: Open text doc. and save to Desk Top

                        LOL Sorry!
                        %Desktop% (or %DesktopNT%)

                        Comment

                        • Lorne
                          Indigo Rose Staff Member
                          • Feb 2001
                          • 2729

                          #13
                          Re: Open text doc. and save to Desk Top

                          It depends what you (or the user) wants to do.

                          First off, %DesktopNT% is only needed on NT, so if it isn't NT4/2K/XP, just use %Desktop%.

                          If it is an NT OS, then use %Desktop% if you only want the text file to appear on the current user's desktop, or use %DesktopNT% if you want the text file to appear on all users' desktops.

                          As to which you should use, you could ask the user, but it probably makes more sense in this case to use %Desktop%, since I assume none of the other users need to see the current user's test results.
                          --[[ Indigo Rose Software Developer ]]

                          Comment

                          • Bruce
                            Indigo Rose Customer
                            • Jun 2001
                            • 2134

                            #14
                            Re: Open text doc. and save to Desk Top

                            Soooo, if understand you correctly... %Desktop% would place the file on the current user's desktop only as opposed to the desktop of all users on the network. Yes?

                            Comment

                            • Lorne
                              Indigo Rose Staff Member
                              • Feb 2001
                              • 2729

                              #15
                              Re: Open text doc. and save to Desk Top

                              No, as apposed to the desktops of all users on that system. This has nothing to do with the network.

                              You know how different users can log into a PC? Under NT/2K/XP, each user has their own settings, their own My Documents folder, their own desktop folder, etc. The user-specific desktop folder is what %Desktop% is referring to.

                              If you log into your PC as Bruce, and copy a file onto your desktop, it goes into a path like this:

                              C:\Documents and Settings\Bruce\DESKTOP

                              If you log in as Samantha, and copy a file onto your desktop, it goes here instead:

                              C:\Documents and Settings\Samantha\DESKTOP

                              If you log in as Bruce, you can't see the files on Samantha's desktop, and vice-versa.

                              In both cases, that's %Desktop%. If you're logged in as Bruce, %Desktop% will be C:\Documents and Settings\Bruce\DESKTOP. If you're logged in as Samantha, %Desktop% will be C:\Documents and Settings\Samantha\DESKTOP.

                              Now, %DesktopNT% points to a path like this:

                              C:\Documents and Settings\All Users\DESKTOP

                              Any files put there are seen by all users. So, if you copied a file into that path, it would be on the desktop if you logged in as Bruce, and it would also be there if you logged in as Samantha.
                              --[[ Indigo Rose Software Developer ]]

                              Comment

                              Working...
                              X