Announcement

Collapse
No announcement yet.

Puzzled Help please!

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

    Puzzled Help please!

    Hello everyone,

    What I have here is the start of a project, But it is throwing up error codes. This script checks for drive S: and then if its there check for S:\USB_KEY.FAB . I would like it to say for instance "Welcome ~Ghost~" one time until it is replaced with a different authorized key. Each USB key has its own UUID. One last thing could you also help me find a way when drive S: is taken out it resets the last UUID key read?

    Thank you

    Error Codes:
    -with it plugged in first then running it.-

    Error - Running script, script run or compile error in file: Test Zone Key_Check.txt13:Type mismatch: 'arrFileLines' in line 55 More info: Type mismatch: 'arrFileLines'

    -with it not plugged in first then running it.-

    NO ERRORS

    -with it not plugged in first then running it. Plugging it in with script running.-

    Error - Running script, script run or compile error in file: Test Zone - Key_Check.txt13:Type mismatch: 'arrFileLines' in line 55 More info: Type mismatch: 'arrFileLines'

    ~Ghost~
    Last edited by ~Ghost~; July 18, 2016, 03:13 PM.

    #2
    Rather than:

    Dim arrFileLines

    Try:

    Dim arrFileLines(0)
    Jon

    Comment


      #3
      Thanks for replying. When I made the changes the following error code appeared.

      Error - Running script, script run or compile error in file: Test Zone - Key_Check.txt13:Type mismatch: 'arrFileLines' in line 32 More info: Type mismatch: 'arrFileLines'

      ~Ghost~
      Last edited by ~Ghost~; July 14, 2016, 05:08 PM.

      Comment


        #4
        I can't test this for you, however I see 2 issues:

        Code:
        Redim Preserve arrFileLines(i)
        And:

        Code:
        '//FAB Varibles//
        FAB_FNAME = arrFileLines(0)
        FAB_MNAME = arrFileLines(1)
        FAB_LNAME = arrFileLines(2)
        FAB_LGRAMAR = arrFileLines(3)
        FAB_GENDER = arrFileLines(4)
        FAB_ACCESSLVL = arrFileLines(5)
        FAB_UUID = arrFileLines(6)
        FAB_CDATE = arrFileLines(7)
        FAB_CTIME = arrFileLines(8)
        FAB_EXPIRATION = arrFileLines(9)
        FAB_PHONE = arrFileLines(10)
        FAB_CARRIER = arrFileLines(11)
        FAB_EMAIL = arrFileLines(12)
        FAB_RELATION = arrFileLines(13)
        FAB_LABLE = arrFileLines(14)
        FAB_STAYING = arrFileLines(15)
        FAB_SCED = arrFileLines(16)
        FAB_MEDS = arrFileLines(17)
        FAB_FLAGREASON = arrFileLines(18)
        Unless you can guarantee that looping through the file will fill the array with at least 19 entries (0-18), your Redim preserve statement will shorten the array size and cause errors when saving to the variables.
        Jon

        Comment


          #5
          It seems, It don't want to do it and I was thinking about it and that may use to many resources anyways. What if I called it from one script to another and pass the variables so a script would request first name and access level as needed. How would one do that with homeseer? Could I get a sample code explaining the pass? By the way I really appreciate your help.

          ~Ghost~
          Last edited by ~Ghost~; July 14, 2016, 06:17 PM.

          Comment


            #6
            Update:
            The script is now working great the only issue is I get this annoying message box that is labeled "Script Control" and the message is "The script you are executing to run. Click End to abort the script, of Continue to continue script execution". Is there a way to stop the messages with out turning off "Scripts can time out" in the control panel?

            Comment


              #7
              You would have to convert it to VB.NET
              Jon

              Comment


                #8
                I have not the slightest idea how to write in .NET. I will have to find another way. Thank you Jon00 for your help.

                ~Ghost~

                Comment

                Working...
                X