I would like to be able to access variables from different zones without have to switch to the zone.
For example, be able to play/stop/next/pause a zone without using "zone set" or be able to change the volume or mute a zone.
'*************************************************************************
'
' To call this example you have to set the Xlobby Variable Syntaxe to :
'
' synch_zones.txt
'
'*************************************************************************
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByRef lParam As Object) As Integer
Public Sub Main()
'Start Script'
dim Zones(6) as string
dim i as integer
dim j as integer
Dim hwndWinamp(6) as integer
Dim Res as integer
' Populate Zones array '
Zones(0) = "Den"
Zones(1) = "Kitchen"
Zones(2) = "Dinning"
Zones(3) = "Living"
Zones(4) = "Outside"
Zones(5) = "Extra"
' Get handles '
For i = 0 To 5
hwndWinamp(i) = FindWindow(Zones(i),vbNullString)
Next i
' Send Stop Command '
For j = 0 To 5
Res = SendMessage(hwndWinamp(j), 273, 40047, 0)
Next j
' Send Play Command '
For j = 0 To 5
Res = SendMessage(hwndWinamp(j), 273, 40045, 0)
Next j
End Sub
End Module