1 Reply Latest reply on Feb 21, 2007 2:41 AM by Newsgroup_User

    Saving content

    RobHack
      Hi
      I am wanting to record the number of time a user clicks on a button and then when exiting to save that to a TXT file on the hard drive. (the PC is a dedicated terminal)
      "
      I have been able to record the clicks to a field cast member but cant't get the value in the field to save to a file...
      I have tried Buddy File, but there does not seem to be a way to put my value in...

      Script to record button click
      =======================
      on mouseUp me
      go to "main+1"
      put value(member("home-push").text)
      member("home-push").text = string(value(member("home-push").text) + 1)
      end
      ++++++++++++++++++++++++++++++


      button to save results into file
      ============================
      on mouseUp me
      home = member("home-push")
      ok = baAppendFile( "c:\xxxx\Stats\home-push.txt", "home" )
      ++++++++++++++++++++++++++++++++++++++++++

      This puts the word ( home ) into the txt file

      any help welcome

      Thanks
        • 1. Re: Saving content
          Level 7
          > button to save results into file
          > ============================
          > on mouseUp me
          > home = member("home-push")
          > ok = baAppendFile( "c:\xxxx\Stats\home-push.txt", "home" )
          > ++++++++++++++++++++++++++++++++++++++++++
          >
          > This puts the word ( home ) into the txt file

          on mouseUp me
          home = member("home-push").text
          ok = baAppendFile("c:\xxxx\Stats\home-push.txt", home)
          -- check value of OK
          -- any other stuff
          end mouseUp

          HTH

          Andrew