Announcement

Collapse
No announcement yet.

Scripting Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Scripting Question

    Bryan wrote this script for me, but I keep getting an error. I believe it may have something to do with the object syntax in line 18 or 19. The error I get is "object doesn't support this property or method". Can someone take a look. It is supposed to copy the last image taken into another directory. Thanks
    Attached Files

    #2
    Beach,

    Try putting a msgbox(LastImageName) after the line
    LastImageName = hs.GetIniSetting("Thumbs", "LastImageName", "", "hspi_Hauppauge_Capture.ini")
    To see what is being returned.

    The line f = fso.GetFile(LastImageName)
    needs a full path name like c:/temp/image.jpg.
    -Rupp
    sigpic

    Comment


      #3
      Rupp,

      The message box returned:

      c:\Program Files\Homeseer\Capture\Front Door Camera_

      So it is getting a full path. Any other suggestions?

      Comment


        #4
        Beach,
        Is that all its returning? If so that's the problem. You need a file name for the script to work.
        -Rupp
        sigpic

        Comment


          #5
          Rupp

          It is returning a picture name. There is a .jpg at the end of the line, I just didn't finish printing it all out. Can it end in .jpg, or does it have to be something else?

          Comment


            #6
            Beach,
            I should have looked closer. The problem is you need the word set in front of
            set FSO = CreateObject("Scripting.FileSystemObject")
            set f = fso.GetFile(LastImageName)
            -Rupp
            sigpic

            Comment


              #7
              Rupp, it worked! Thanks so much. I really appreciate all the help you have given me. I was wondering what script you use for your cameras on your ultra status page? I like it a lot. I'm trying to set my ultra status page up now, but I'm so confused about how to do it. I tried to set up another section, but it shows up blank. Do you know if there are instructions on how to do it anywhere? Thanks again.

              Comment


                #8
                Beach,

                Your welcome.

                I do not use Ultra Status. I use an asp page that has been added to over the months and years. The ultra status is a better page because it allows user interaction. I'm just too lazy to switch.
                -Rupp
                sigpic

                Comment

                Working...
                X