Announcement

Collapse
No announcement yet.

Undocumented Scripting/Plugin functions

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

  • aa6vh
    replied
    Syntax is lacking a just little bit for those not all that familiar with VB .net syntax:

    Code:
    Sub Main(ByVal Parm As Object)
      If Not hs.IsApplicationRunning("Notepad") Then
          hs.Speak("NotePad is not running")
      End if
    End Sub

    Leave a comment:


  • MattL0
    replied
    Originally posted by jon00 View Post
    Check to see if an Application is running:

    hs.IsApplicationRunning(Application Name As String) As Boolean

    Example:

    Code:
    Sub Main(ByVal Parm As Object)
    If Not hs.IsApplicationRunning("Notepad") Then
    hs.Speak("NotePad is not running")
    End if
    Will have to test this on linux

    Leave a comment:


  • bartbakels
    replied
    Device Unknown status;



    hs.DeviceInvalidValue(xxxx) to get it
    hs.DeviceInvalidValue(xxxx)= false to set

    xxxx = ref

    Leave a comment:


  • jon00
    replied
    Added to the Device Class - Get/Set the Linked Device

    (Introduced in version 3.0.0.451)


    Public Property LinkedDevice(ByVal hs As IHSApplication) As Integer

    This returns or sets the Linked Device Reference for the device: It returns 0 if no devices are linked, else the reference number.

    Example:

    Code:
    Sub Main(ByVal Parm As Object)
        Dim RefNo As Integer = 123
        Dim dv As Scheduler.Classes.DeviceClass
        dv = hs.GetDeviceByRef(RefNo)
        hs.writelog("LinkedDeviceRef", dv.LinkedDevice(nothing))
    End Sub

    Leave a comment:


  • jon00
    replied
    Check to see if an Application is running:

    hs.IsApplicationRunning(Application Name As String) As Boolean

    Example:

    Code:
    Sub Main(ByVal Parm As Object)
        If Not hs.IsApplicationRunning("Notepad") Then
        hs.Speak("NotePad is not running")
    End if
    End sub
    Last edited by jon00; July 30th, 2019, 10:40 AM.

    Leave a comment:


  • rmasonjr
    replied
    +1

    Leave a comment:


  • donstephens
    replied
    I can't add to this list, but really appreciate you starting it.

    Leave a comment:


  • jon00
    started a topic Undocumented Scripting/Plugin functions

    Undocumented Scripting/Plugin functions

    I've started this thread to collate a list of scripting/plugin calls which are currently undocumented and may get lost if not recorded somewhere:

    Device Name from reference:

    hs.devicename(deviceRef As integer) as String

    Event Voice Command from reference (Introduced in version 3.0.0.407)

    hs.GetEventVoiceCommand(eventRef as integer) as String

    If you know any more, feel free to post here.
Working...
X