Announcement

Collapse
No announcement yet.

IsPluginRunning function

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

    IsPluginRunning function

    I'm trying to use the IsPluginRunning in a VB.net script and getting an 'identifier expected' error. Can you point out where my syntax is incorrect?

    PHP Code:
    Dim Xap As Boolean hs.PluginFuction("EasyTrigger",,"IsPluginRunning", new object[] {"mcsXap"}) 
    Thanks
    Don

    #2
    try this:

    Code:
    Dim Xap As Boolean = hs.PluginFuction("EasyTrigger","","IsPluginRunning", new Object() {"mcsXap"})

    Comment


      #3
      Thanks for the quick response.

      Still not working. Error message as follows
      PHP Code:
      Running script test.vb :Exception has been thrown by the target of an invocation.->Does entry point Main exist in scriptat System.RuntimeMethodHandle.InvokeMethod(Object targetObject[] argumentsSignature sigBoolean constructorat System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object objObject[] parametersObject[] argumentsat System.Reflection.RuntimeMethodInfo.Invoke(Object objBindingFlags invokeAttrBinder binderObject[] parametersCultureInfo cultureat A.c17b105f989efe61e5979e67bec1ef734.cffd66cb0782c50126727e3fa75582d7a() 
      Script is pretty simple.
      PHP Code:
       Sub Main(byVal args As String)
       
          
      LogIt("start",1)
          
          
      Dim Xap As Boolean hs.PluginFuction("EasyTrigger","","IsPluginRunning", new Object() {"mcsXap",""})
          
          If 
      Xap Then 
                  LogIt
      ("The plugin Is Running " ,1)
          Else
              
      Logit("Plugin is not running",2)
          
      End If


          
      LogIt("stop",1
      Don

      Comment


        #4
        I tried the following and it worked:

        Looks like your script is missing the "End Sub" line, and use PluginFuction instead of PluginFunction


        Code:
         Sub Main(byVal args As String) 
          
            Dim Xap As Boolean = hs.PluginFunction("EasyTrigger","","IsPluginRunning", new Object() {"mcsXap",""}) 
        	hs.writelog("Script", "Xap=" & Xap)
        End Sub

        Comment


          #5
          Thanks, works here now.

          I miscopied the command from the docs. My bad.

          appreciate the help.
          Don

          Comment

          Working...
          X