Announcement

Collapse
No announcement yet.

Random Speak a line.

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

  • Random Speak a line.

    I used to use a nice little Random Speak script in HS2 from A.J. Griglak.
    Anyone converted it to HS3 (or want to) or know of a better way to do it?

    Here is what it did. You could setup a text file like rn_hello.txt that might look something like:
    Code:
    Hi
    Good Day
    Missed you
    Hello
    Hi sweetie
    Nice to see you
    Missed me?
    Hey
    Then call call it from a txt script with

    hs.RunEx "rn_random_speak.txt", "main","rn_hello.txt"
    and it would speak one of the lines at random from the file.

    Here is the HS2 "rn_random_speak.txt" code:
    Code:
    ' Based up on Speak Random Quote 1.1 by Christopher Lienau
    ' revised by A.J. Griglak
    '
    ' PURPOSE:  Speak a randomly selected greeting from pre-defined text file.
    ' INPUT:    rn_bye.txt in HS Scripts directory
    ' OUTPUT:   Speaks one of the lines that are randomly selected in the text file.
    '
    '
    Option Explicit
    
    DIM random, QuoteFileName, QuoteFile, FS, ThisQuoteFile, QuoteLine, Tcount, counter, quotes, aVoice
    
    Sub Main(QuoteFileName)
    aVoice= "" 
    QuoteFile = hs.GetAppPath & "/scripts/" & QuoteFileName
    Set fs = CreateObject("Scripting.FileSystemObject")
    
    ' Read the number of different quotes (full lines ---> return) in the QuoteFIleName
    Set ThisQuoteFile = fs.OpenTextFile(QuoteFile, 1, False)
    
    counter = 0
    
    Do While Not ThisQuoteFile.AtEndOfStream
    	Tcount = Tcount + 1
    	QuoteLine = ThisQuoteFile.readline
    loop
    Set ThisQuoteFile = Nothing
    
    	' Generate a Random number from 1 to quotes (number of quotes in the file)
    quotes = Tcount
    random = Int(Rnd*quotes)
    	
    	'  Randomly select a quote from the file.
    Randomize
    random = INT((quotes - 1 + 1) * Rnd + 1)
    
    Set ThisQuoteFile = FS.OpenTextFile(QuoteFile, 1, False)
    
    counter = 0
    
    Do While Not ThisQuoteFile.AtEndOfStream
    	counter = counter + 1
    	QuoteLine = ThisQuoteFile.ReadLine
    	If counter = random Then
    	' Debug to log 
    	' hs.writelog "Number of Lines = ", Tcount
    		If aVoice = "" then 
    '			system.Speak Quoteline, true
     			hs.Speak Quoteline, true			
    		else 
    			hs.Speak "<Voice Required='Name="+aVoice+"'>" & QuoteLine & "</Voice>",true
    		End if
    	End If
    Loop
    
    ThisQuoteFile.Close
    
    Set ThisQuoteFile = Nothing
    Set FS = Nothing
    
    end sub

  • #2
    I don't have a script for a random phrase but I do have a plugin. It's called Random Phrase.
    You can enter categories and phrases.
    Then when you want a random phrase you call the plugin with a parameter of the category you want to use.

    For example, I have categories for Christmas, Birthdays, Doctor Who, Weather, Scripture, Science Fiction, etc.

    The plugin returns a string of text allowing you to either speak it or use it as you want in a script.

    Random Phrase Forum
    --
    Jeff Farmer
    HS 3, HSPhone
    My HS3 Plugins: CFHSExtras, Random, Restart, Tracker, WeatherXML, PanaBluRay
    Other Plugins In Use: APCUPSD, BLOnkyo, Device History, EasyTrigger, HSTouch Server, PHLocation2, Pushover, RFXCom, UltraGCIR3, UltraMon3, UltraPioneerAVR3, X10, Z-Wave

    Hardware: GoControl Irrigation Controler, Schlage Lever Lock, Schlage Deadbolt, Way2Call Hi-Phone, RFXCom RFXrec433 Receiver, WGL 800, TI-103, Z-Net, Pioneer 1120, Pioneer 1021, Pioneer LX302, Panasonic BDT-110, Panasonic BDT-210 x2

    Comment


    • #3
      I use this vb.net script for an hourly time announcement under HS2. It ought to run under HS3 as it doesn't use anything peculiar to one or the other.
      This one only needs to open/read the data file once, saving a bit of time.

      It's not that complex and can be adapted as you like.

      One thing. Lines in my text file are often quotes and can contain a credit/attribution. Anything found after an optional ( character on the line is not spoken.

      PHP Code:
      Sub Main(ByVal parm As ObjecT)
          Try
              
      Dim Hosts As String "Nero,Homeseer,Android:Garage"
              
      Dim RandomNum As New Random '(System.DateTime.Now.Millisecond)
              Dim Choice,Count As Integer
              Dim SayFile As String = hs.GetAppPath + "\Scripts\Data\Speak Time Attitude.txt"
              Dim SpeakAry() As String
              Dim Say As String

              Randomize
              Count = 0
              Dim fobjCount As New System.IO.StreamReader(SayFile)
              Do While fobjCount.Peek() >= 0
                  Count = Count + 1
                  Redim Preserve SpeakAry(Count)
                  SpeakAry(Count) = fobjCount.ReadLine()
              Loop
              fobjCount.Close()
              fobjCount.Dispose()
              Choice = Int(RandomNum.Next(1,Count))
              If InStr(SpeakAry(Choice),"(") > 0 Then 
                  Say = mid(SpeakAry(Choice),1,InStr(SpeakAry(Choice),"(")-1)
              Else
                  Say = SpeakAry(Choice)
              End If
              Say = "It'
      s $Time " + Say
              If Month(now) = 12 And Day(now) = 25 Then Say = "
      Merry Christmas!. . . " + Say
              hs.Speak(Say,True,Hosts)
              RandomNum = Nothing
              SpeakAry = Nothing
          Catch ex As Exception
              hs.Writelog("
      SpeakTime",ex.Message)
          End Try
      End Sub 
      Real courage is not securing your Wi-Fi network.

      Comment


      • #4
        As the above was intended for a single purpose, I'd never considered any need for passing a file name to use to the script. It would take me less than 15 minutes to do this if need be.
        Real courage is not securing your Wi-Fi network.

        Comment


        • #5
          Thanks CFGuy, but not quite what I am looking for.

          Wadenut, that works, and I do need to be able to pass the name for the "Speak Time Attitude" text file.

          What I want to do is to give my systems a little artificial like intelligence. So she (my house) says things in different ways each time. I could make many versions of your (Wadenut's) file. One for saying "Hi" or "Hello", another one for saying "A car is arriving" or "A vehicle is coming", but it would be better to just have multiple "data" files and the same vb.

          I really just need to understand how to send a parameter like the name of the Text data file from another .vb script file.

          Comment


          • #6
            Originally posted by ViperJD View Post
            Thanks CFGuy, but not quite what I am looking for.

            Wadenut, that works, and I do need to be able to pass the name for the "Speak Time Attitude" text file.

            What I want to do is to give my systems a little artificial like intelligence. So she (my house) says things in different ways each time. I could make many versions of your (Wadenut's) file. One for saying "Hi" or "Hello", another one for saying "A car is arriving" or "A vehicle is coming", but it would be better to just have multiple "data" files and the same vb.

            I really just need to understand how to send a parameter like the name of the Text data file from another .vb script file.
            I have time today. I'll look at it this morning. I'll also pass the "Hosts", as I'll be needing that. In that way you can include in the parameter the speaker clients you want the speech to go to.

            So, the parameter will look like "FileName|Host1,Host2,Host3...". If the hosts part is omitted, as in just "FileName" it'll default to All speaker clients.
            Real courage is not securing your Wi-Fi network.

            Comment


            • #7
              This will do what you want.
              It will require a path and filename to be passed as a parameter as your previous example did.
              You can optionally include a list of Speaker Clients as well.
              ie:
              ("Data\RandomLines.txt"|Host1,Host2,...") will speak to the specified clients.
              or
              ("Data\RandomLines.txt") will speak to ALL speaker Clients.

              If you omit the file name, the script WILL fault. The File must exist somewhere under the Homeseer directory, else FAULT.

              I want to augment this so I can optionally have the time of day spoken before the random line as well, as my previous script did. This proved to be a bit more complex to accomplish while maintaining only your specified function, so I guess I have a project for today.
              I actually have two applications:
              1. Speaking the time of day + a random line spoken.
              2. Welcoming someone home when a door is unlocked from outside + a bit of an insult for them.
              Up until now I've used two variations of this script, but now you have me thinking. If I do this, I'll post the result in the library (perhaps with a note here as well).

              PHP Code:
               Sub Main(FileAndHosts As String)
               
              ' Parameters:
               '  "FileName|Host1,Host2..." ' FileName + Speaker Client List
               ' "FileName"   ' FileName specified with no Hosts list. All Speaker Clients receive speech.
               ' ""    ' No Parameters SCRIPT WILL FAULT.
                Try
                Dim Hosts As String
                Dim RandomNum As New Random '
              (System.DateTime.Now.Millisecond)
                
              Dim Choice,Count As Integer
                Dim SayFile 
              As String hs.GetAppPath "\" 
                Dim SpeakAry() As String
                Dim Say As String
                Dim ParmAry() As String
                
                If InStr(FileAndHosts,"
              |") > 0 Then
                 ParmAry = Split(FileAndHosts,"
              |")
                 SayFile = SayFile + ParmAry(0)
                 Hosts = ParmAry(1)
                Else
                 SayFile = SayFile + FileAndHosts
                 Hosts = ""
                End If
                 Randomize
                Count = 0
                Dim fobjCount As New System.IO.StreamReader(SayFile)
                Do While fobjCount.Peek() >= 0
                 Count = Count + 1
                 Redim Preserve SpeakAry(Count)
                 SpeakAry(Count) = fobjCount.ReadLine()
                Loop
                fobjCount.Close()
                fobjCount.Dispose()
                 Choice = Int(RandomNum.Next(1,Count))
                If InStr(SpeakAry(Choice),"
              (") > 0 Then 
                 Say = mid(SpeakAry(Choice),1,InStr(SpeakAry(Choice),"
              (")-1)
                Else
                 Say = SpeakAry(Choice)
                End If
                hs.Speak(Say,True,Hosts)
                RandomNum = Nothing
                SpeakAry = Nothing
               Catch ex As Exception
                hs.Writelog("
              SpeakRandomLine",ex.Message)
               End Try
              End Sub 
              Real courage is not securing your Wi-Fi network.

              Comment


              • #8
                This is fantastic! One question, how do I format a script call to pass the parameters? For example if I ran your file from the Control Panel and your file I called "rn_RandomTest.vb" and the data file "rn_SayHello.txt".

                Normally I would do:

                &hs.RunScript("rn_RandomTest.vb", false, false)

                So where do I put the ("rn_SayHello.txt|FAMILY-PCefault")?

                Thanks again for working this.

                Comment


                • #9
                  Hmmm. I'm not sure about running it from the control panel. That's not the way I'd expect to run this.

                  From an event however the call parameter would be
                  "rn_SayHello.txt|FAMILY-PC: default" {omit the space after the colon} In fact, you could specify just FAMILY-PC

                  This would expect the file to be located in your HS root directory.
                  If you want it anywhere else, you need to include the path:
                  "Scripts\rn_SayHello.txt|FAMILY-PC: default"
                  would put it in the "Scripts" Folder.

                  My call in an HS2 event looks like:
                  "Scripts\Data\Speak Time Attitude.txt|Nero"

                  where my file happens to be located in \Homeseer\Scripts\Data\
                  and
                  I want the speech to go to the client called "Nero"

                  Let me fire up HS3, and I'll post a screen shot of an event action.

                  ---------------------
                  A bit of a teaser. I nearly have the time (or whatever) working. It will be spoken before the random line.

                  "Scripts\Data\Speak Time Attitude.txt|It's $Time{silence msec='250'/}|Nero"

                  Here, I've inserted a third optional parameter to speak the time and pause before reading the random line. Any HS replacement variable should work as well as any SAPI commands for the speech.
                  Real courage is not securing your Wi-Fi network.

                  Comment


                  • #10
                    OK! Looking in good.
                    I found the right syntax to execute it from the HS3 Control Panel's Immediate Script Command:

                    &hs.RunScriptFunc("rn_jd_RandomTest.vb","Main","Scripts\rn_h ello.txt|FAMILY-PC:default",false,false)

                    PS: I kept getting an error until I realized I did not capitalize the "M" in "Main" and because it was "Sub Main" in my file.

                    Comment


                    • #11
                      Originally posted by ViperJD View Post
                      OK! Looking in good.
                      I found the right syntax to execute it from the HS3 Control Panel's Immediate Script Command:

                      &hs.RunScriptFunc("rn_jd_RandomTest.vb","Main","Scripts\rn_h ello.txt|FAMILY-PC:default",false,false)

                      PS: I kept getting an error until I realized I did not capitalize the "M" in "Main" and because it was "Sub Main" in my file.
                      Yeah, case would do it.
                      So it works for you now? My HS3 is coughing before it even starts the script. So much for my 15 minute project.
                      Real courage is not securing your Wi-Fi network.

                      Comment


                      • #12
                        Yeah, I killed my HS2, lost all my Z-Wave settings inside my Z-Troller (which like a typical IT developer, I did not back it up), so I am finally making the big leap into HS3.

                        Thanks for the help and the file. I added the header to my file (any changes :
                        Code:
                        '  --------------------------------
                        '        Random Speech Generator 
                        '            by Wadenut (HomeSeer User)
                        '  -----------------------------------------------------------------------------------------------------------
                        '  File: rn_SpeakRandomText.vb
                        '  --------------------------------
                        '  This script will generate "random" speech based on a list text file.
                        '  Example: under "Scripts\Data\" create a file called "rn_SayHello.txt" and add a number of lines to it like:
                        '	Hello
                        '	Hi
                        '	Hey there
                        '	Good to see you
                        '	Good day
                        '
                        '   Parameters:
                        '    "FileName|Host1,Host2..."     ' FileName + Speaker Client List
                        '    "FileName"                    ' FileName specified with no Hosts list. All Speaker Clients receive speech.
                        '     ""                           ' No Parameters SCRIPT WILL FAULT.
                        '
                        '   Syntax Ex: ("rn_SpeakRandomText.vb","Main","Scripts\Data\rn_SayHello.txt|FAMILY-PC:default",false,false)
                        ' 
                        '   Control Panel ex: &hs.RunScriptFunc("rn_SpeakRandomText.vb","Main","Scripts\Data\rn_SayHello.txt|FAMILY-PC:default",false,false) 
                        '	 
                        '  -----------------------------------------------------------------------------------------------------------
                        Last edited by ViperJD; February 21st, 2015, 09:58 AM.

                        Comment


                        • #13
                          One more change.

                          A third parameter; phrase to be spoken before the random text. This can include HS replacement variables and SAPI modifiers.

                          Here is what I hope to be the final. This works under both HS2 and HS3.

                          Code:
                            
                           Sub Main(FileAndHosts As String)
                           
                          ' Include replacement variables
                          ' $Time, $Date, $DV, $DS
                           
                           ' Parameters:
                           ' "FileName|SayBefore|Host1,Host2..." ' FileName, Line to speak before Random Line, Speaker Client List
                           '  "FileName|Host1,Host2..."  ' FileName, Speaker Client List
                           ' "FileName"    ' FileName specified. All Speaker Clients.
                           ' ""     ' No Parameters SCRIPT WILL FAULT.
                           ' Example:
                           ' "Scripts\Data\Speak Time Attitude.txt|It's $Time{silence msec='250'/}|Homeseer,Nero,Android:Garage"
                           '  Selects file \Homeseer\Scripts\Data\Speak Time Attitude.txt
                           '  Inserts the phrase It's $Time before the random text adding a short pause between.
                           '  Speaks to hosts Homeseer,Nero and Android:Garage
                           ' Parameter 1 must be present.
                           ' Parameter 2 and 3 are optional.  If Hosts are required but no 'Before' Text is included, use format FileName||Hosts
                            
                            Try
                            Dim Hosts As String
                            Dim RandomNum As New Random '(System.DateTime.Now.Millisecond)
                            Dim Choice,Count As Integer
                            Dim SayFile As String = hs.GetAppPath + "\" 
                            Dim SpeakAry() As String
                            Dim Say As String
                            Dim SayBefore As String = ""
                            Dim ParmAry() As String
                            
                            If InStr(FileAndHosts,"|") > 0 Then
                             ParmAry = Split(FileAndHosts,"|")
                             If UBound(ParmAry) > 1 Then
                              ' Includes filename + SpeakBefore + Hosts
                              SayFile = SayFile + ParmAry(0)
                              SayBefore = ParmAry(1)
                              SayBefore = Replace(SayBefore,"{","<")
                              SayBefore = Replace(SayBefore,"}",">")
                              Hosts = ParmAry(2)
                             Else
                              ' Includes FileName + Hosts
                              SayFile = SayFile + ParmAry(0)
                              Hosts = ParmAry(1)
                             End If
                            Else
                             ' Contains only FileName
                             SayFile = SayFile + FileAndHosts
                             Hosts = ""
                            End If
                             Randomize
                            Count = 0
                            Dim fobjCount As New System.IO.StreamReader(SayFile)
                            Do While fobjCount.Peek() >= 0
                             Count = Count + 1
                             Redim Preserve SpeakAry(Count)
                             SpeakAry(Count) = fobjCount.ReadLine()
                            Loop
                            fobjCount.Close()
                            fobjCount.Dispose()
                             Choice = Int(RandomNum.Next(1,Count))
                            If InStr(SpeakAry(Choice),"(") > 0 Then 
                             Say = SayBefore + mid(SpeakAry(Choice),1,InStr(SpeakAry(Choice),"(")-1)
                            Else
                             Say = SayBefore + SpeakAry(Choice)
                            End If
                            hs.Speak(Say,True,Hosts)
                            RandomNum = Nothing
                            SpeakAry = Nothing
                           Catch ex As Exception
                            hs.Writelog("SpeakRandomLine",ex.Message)
                           End Try
                          End Sub
                          Last edited by Wadenut; February 21st, 2015, 11:25 AM.
                          Real courage is not securing your Wi-Fi network.

                          Comment


                          • #14
                            If I use:
                            &hs.RunScriptFunc("rn_SpeakRandomText.vb","Main","Scripts\Da ta\rn_SayHello.txt|FAMILY-PC:default",false,false)

                            the new code does not work in HS3.
                            I get a long list of errors using the same input:

                            Code:
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'Garage' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'Android' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'Nero' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: Method arguments must be enclosed in parentheses.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: Expression expected.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'Speaks' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: Comma, ')', or a valid expression continuation expected.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'the' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: Method arguments must be enclosed in parentheses.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'Inserts' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: Comma, ')', or a valid expression continuation expected.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'Speak' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'System.Data' is a namespace and cannot be used as an expression.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'Scripts' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'Homeseer' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: Method arguments must be enclosed in parentheses.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'file' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: 'Selects' is not declared. It may be inaccessible due to its protection level.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: Syntax error.
                            Feb-21 10:18:31 AM	 	Error	Compiling script rn_jd_RandomTest.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
                            Feb-21 10:18:30 AM	 	System	Control Panel Immediate Script: &hs.RunScriptFunc("rn_jd_RandomTest.vb","Main","Scripts\Data\rn_SayHello.txt|FAMILY-PC:default",false,false)

                            Comment


                            • #15
                              Originally posted by ViperJD View Post
                              If I use:
                              &hs.RunScriptFunc("rn_SpeakRandomText.vb","Main","Scripts\Da ta\rn_SayHello.txt|FAMILY-PC:default",false,false)

                              the new code does not work in HS3.
                              I get a long list of errors using the same input:

                              Code:
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'Garage' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'Android' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'Nero' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: Method arguments must be enclosed in parentheses.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: Expression expected.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'Speaks' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: Comma, ')', or a valid expression continuation expected.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'the' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: Method arguments must be enclosed in parentheses.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'Inserts' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: Comma, ')', or a valid expression continuation expected.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'Speak' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'System.Data' is a namespace and cannot be used as an expression.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'Scripts' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'Homeseer' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: Method arguments must be enclosed in parentheses.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'file' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: 'Selects' is not declared. It may be inaccessible due to its protection level.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: Syntax error.
                              Feb-21 10:18:31 AM         Error    Compiling script rn_jd_RandomTest.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
                              Feb-21 10:18:30 AM         System    Control Panel Immediate Script: &hs.RunScriptFunc("rn_jd_RandomTest.vb","Main","Scripts\Data\rn_SayHello.txt|FAMILY-PC:default",false,false)
                              Took me a bit of time to figure out how you were seeing errors on my speaker clients by name. Forgot to comment some lines at the top. Try again. I've fixed it above.

                              If you don't use the additional parameter, you need to include a place holder for it. Try:
                              "Scripts\Data\rn_SayHello.txt||FAMILY-PC:default",false,false)"
                              (note the two pipe characters in the middle).


                              Even so, I'm still having trouble getting HS3 to start the script. I was before as well actually before you mentioned the previous vs worked for you.
                              Last edited by Wadenut; February 21st, 2015, 11:46 AM.
                              Real courage is not securing your Wi-Fi network.

                              Comment

                              Working...
                              X