Im working on the DVBViewer COM interface trying to get an associative array containing all Favourite Channels, so that I can enumerate them and assign all channel menu items (14 channels). It seems language differences between c++ and AHK in how to assign arrays makes this quite hard to solve, cuz it is impossible to get the array and enumerate it. When it works Im abled to change channels from the DVBViewer thumbnail Im using. This is the line im passing and there is some COM interface syntax commented in codebox.
hhh := iDVBViewer.FavoritesManager.GetFavorites.Item[Index: Integer] Although you are not abled to test the COM code, but I have to ask if anyone might know something that could work?
Code: Select all
DVBVGuiContextMenu:
If (A_Gui = "DVBV") && (A_GuiEvent = "RightClick") {
;msgbox % iDVBViewer.Channelmanager.GetbyChannelname("SVT1 HD")
;msgbox % iDVBViewer.CurrentChannel.Name
;msgbox % iDVBViewer.Channelmanager.GetChannelList(List)
;msgbox % iDVBViewer.FavoritesManager.GetFavorites.Count ; Public property Count: Integer;
hhh := iDVBViewer.FavoritesManager.GetFavorites.Item[Index: Integer] ; property Item[Index: Integer]: IFavoritesItem;
/*The IFavoritesItem list can by accessed like
an array with an Index from 0 to count-1.
Read only Property. Default property.*/
For k, v in hhh
msgbox %k%=%v%
Menu, DVBVContextMenu, Add
Menu, DVBVContextMenu, DeleteAll
Menu, DVBVContextMenu, Add, channel1, channel1
Menu, DVBVContextMenu, Add, channel2, channel2
Menu, DVBVContextMenu, Show, %A_GuiX%, %A_GuiY%
}
return