onclick Open the context menu information item for currently selected item?
#1
I want to be able to click on an item and activate the information window as if it were being run from the context menu for the currently selected item, however I am already in the information screen and I cant figure out the right command.

So my goal is to be able to click on similar items within the Bingie Information screen to move from one to the next. I've got it working so that when the similar items are displayed and I click on the context menu and select "Information" it loads exactly as I want it.

However I cant get an <Onclick> to perform the same command.

<onclick>info</onclick>
<onclick>Action(info)</onclick>

Wont work in this context as they just close the already active information window.

                    <onclick>Dialog.Close(movieinformation)</onclick>
                    <onclick>ActivateWindow(movieinformation)</onclick>

This also doesnt work, as "ActivateWindow(movieinformation)" seems to be able to open the screen but not when its already open.
Ive been hunting around to try and see where the context menu item "Information" command comes from but i cant see it.

Can anyone tell me how to launch a context specific information screen, ie show the information screen for the current item using the titan bingie special info screen?

Ive already tried:

Ive tried:
<onclick>Dialog.Close(movieinformation)</onclick>
<onclick>ActivateWindow(movieinformation)</onclick>
<onclick>ActivateWindow(movieinformation)</onclick>
<onclick>SetFocus(8000) </onclick> 
<onclick>SetFocus(5050) </onclick> 
<onclick>SetFocus(352) </onclick> 
<onclick>ContextMenu</onclick>
<onclick>Info</onclick>

(Not all at the same time, just various combinations)
Reply
#2
(2020-07-12, 14:15)henryjfry Wrote: I want to be able to click on an item and activate the information window as if it were being run from the context menu for the currently selected item, however I am already in the information screen and I cant figure out the right command.

So my goal is to be able to click on similar items within the Bingie Information screen to move from one to the next. I've got it working so that when the similar items are displayed and I click on the context menu and select "Information" it loads exactly as I want it.

However I cant get an <Onclick> to perform the same command.

<onclick>info</onclick>
<onclick>Action(info)</onclick>

Wont work in this context as they just close the already active information window.

                    <onclick>Dialog.Close(movieinformation)</onclick>
                    <onclick>ActivateWindow(movieinformation)</onclick>

This also doesnt work, as "ActivateWindow(movieinformation)" seems to be able to open the screen but not when its already open.
Ive been hunting around to try and see where the context menu item "Information" command comes from but i cant see it.

Can anyone tell me how to launch a context specific information screen, ie show the information screen for the current item using the titan bingie special info screen?

Ive already tried:

Ive tried:
<onclick>Dialog.Close(movieinformation)</onclick>
<onclick>ActivateWindow(movieinformation)</onclick>
<onclick>ActivateWindow(movieinformation)</onclick>
<onclick>SetFocus(8000) </onclick> 
<onclick>SetFocus(5050) </onclick> 
<onclick>SetFocus(352) </onclick> 
<onclick>ContextMenu</onclick>
<onclick>Info</onclick>

(Not all at the same time, just various combinations)
Some further stuff ive tried which doesnt work:

<onclick>SetFocus(8000) </onclick> 
<onclick>SetFocus(5050) </onclick> 
<onclick>SetFocus(352) </onclick> 
<!---onclick>ActivateWindow(12003)</onclick--->
<onclick>Back</onclick>
<onclick>Back</onclick>
<onclick>Dialog.close(movieinformation)</onclick>
<onclick>Dialog.close(12003)</onclick>
<onclick>Dialog.close(8000)</onclick> 
<onclick>Dialog.close(5050)</onclick> 
<onclick>Dialog.close(352)</onclick> 
<onclick>ActivateWindow(12003,videodb://inprogresstvshows/$INFO[Container(352).ListItem.DBID]/-2/?tvshowid=$INFO[Container(352).ListItem.DBID],return)</onclick>



<!---onclick>ContextMenu</onclick>
<!---onclick>SetFocus(ContextMenu) </onclick> 
<!---onclick>SetFocus(10106) </onclick> 
<!---onclick>AlarmClock(alarm_similar,Dialog.Close(ContextMenu),00:01,true)</onclick---> 
<!---onclick>AlarmClock(alarm_similar,SendClick(ContextMenu,1001),00;01,true)</onclick---> 
<!---onclick>Dialog.Close(ContextMenu)</onclick--->
<!---onclick>SendClick(10106, 1001)</onclick--->
<!---onclick>SendClick(ContextMenu, 1001)</onclick--->
<!---onclick>SendClick(352, 1001)</onclick--->
<!---onclick>SendClick(5050, 1001)</onclick--->
<!---onclick>SendClick(8000, 1001)</onclick--->

Opening the context menu works, but I then cant select anything from it, once the context menu opens it seems to stop processing clicks.
And various methods of opening the movieinformation window (12003) only ever seem to open the last selected item or the currently selected item.
i.e this command isnt respected and wont open to the specific point despite beeing explicitly specified:

ActivateWindow(12003,videodb://inprogresstvshows/$INFO[Container(352).ListItem.DBID]/-2/?tvshowid=$INFO[Container(352).ListItem.DBID],return)


If I open the context menu on the item via onclick:

<onclick>SetFocus(8000) </onclick> 
<onclick>SetFocus(5050) </onclick> 
<onclick>SetFocus(352) </onclick> 
<onclick>ContextMenu</onclick>

I can then trigger the correct action via command line:
kodi-send --action='SendClick(10106,1001)'

Which works, but within the XML setting up this command doesnt work.

Any help?
Reply
#3
So i've got my modifications made to the "Similar" window in the titan DialogVideoInfo and this basically works triggering the context menu and I can then click on "Information" and see the similar items for that show or back out to the information dialog for that show.

But I cant figure out how to reload the movieinformation dialog to the currently selected item, all I can do is either close it, or reopen the exact same screen.
I figure it should be achievable, for now two clicks to open the context menu and then the information is fine, but id rather it be seamless (as I could then add some properties to hide stuff or whatever, whereas the way it appears to be working now once i open the context menu nothing happens after that).

xml:

                <!--Similar List-->
                <control type="panel" id="352">
                    <posx>600</posx>
                    <posy>250</posy>
                    <width>800</width>
                    <height>714</height>
                    <onleft>ClearProperty(AdditionalInfo)</onleft>
                    <onback>ClearProperty(AdditionalInfo)</onback>
                    <onback>8000</onback>
                    <onleft>SetFocus(8000)</onleft>
                    <scrolltime>200</scrolltime>
                    <orientation>vertical</orientation>
                    <focusposition>0</focusposition>
                    <viewtype label="actor list">list</viewtype>
                    <visible allowhiddenfocus="true">String.IsEqual(Window.Property(AdditionalInfo),similar)</visible>
                    <animation effect="fade" start="100" end="25" time="0" condition="Container(352).IsUpdating">Conditional</animation>
                    <animation effect="slide" start="0,0" end="0,1000" time="0" delay="0" condition="!String.IsEqual(Window.Property(AdditionalInfo),similar)">Conditional</animation>

<onclick>SetFocus(8000)</onclick> 
<onclick>SetFocus(5050)</onclick> 
<onclick>SetFocus(352)</onclick> 
<onclick>ContextMenu</onclick> 

                    <!-- itemlayout movies -->
                    <itemlayout height="357" width="240">
                        <control type="group">
                            <width>233</width>
                            <height>342</height>
                            <include>PosterPanelLayout</include>
                        </control>
                    </itemlayout>
                    <focusedlayout height="357" width="240">
                        <control type="group">
                            <width>233</width>
                            <height>342</height>
                            <include>PosterPanelLayoutFocus</include>
                        </control>

                    </focusedlayout>
                    <content target="video">$VAR[similarInfo]</content>
                </control>

                <!-- similar info details -->
                <control type="group">
                    <include>animation_window_open_close</include>
                    <visible>String.IsEqual(Window.Property(AdditionalInfo),similar)</visible>
                    <control type="group">
                        <right>50</right>
                        <posy>250</posy>
                        <width>530</width>
                        <height>67%</height>
                        <control type="image">
                            <aspectratio align="center" aligny="top" scalediffuse="true">scale</aspectratio>
                            <texture background="true" diffuse="diffuse/poster.png">$INFO[Container(352).ListItem.Art(poster)]</texture>
                            <fadetime>300</fadetime>
                        </control>
                        <!--Panel-->
                        <control type="image">
                            <bottom>-1</bottom>
                            <height>120</height>
                            <bordersize>0</bordersize>
                            <visible>false</visible>
                            <texture background="true" diffuse="diffuse/poster.png">colors/color_white.png</texture>
                            <colordiffuse>$INFO[Skin.String(TagOverlaysPanelColor)]</colordiffuse>
                        </control>
                        <control type="label">
                            <left>10</left>
                            <bottom>0</bottom>
                            <width>93%</width>
                            <height>120</height>
                            <align>left</align>
                            <visible>false</visible>
                            <label>$INFO[Container(352).ListItem.Label2,,[CR]]$INFO[Container(352).ListItem.Label]</label>
                            <font>Reg32</font>
                            <textcolor>$INFO[Skin.String(TagOverlaysTextColor)]</textcolor>
                        </control>
                    </control>
                </control>
            </control>
        </control>
    </include>
Reply
#4
I use the following code to switch from one video to another from dialovideoinfo.xml

in dialogvideoinfo.xml :
 - in your item :

<onfocus>clearproperty(resumable)</onfocus>
<onclick condition="!integer.isequal(listitem.percentplayed,0)">setproperty(resumable,yes)</onclick>
<onclick>setproperty(action,show_informations)</onclick>
<onclick>action(ContextMenu)</onclick>        


in dialogcontextmenu.xml :

<onload condition="string.isequal(window(movieinformation).property(action),show_informations)">dialog.close(movieinformation,true)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations)">action(down)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations) + string.isequal(window(movieinformation).property(resumable),yes)">action(down)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations)">action(select)</onload>
Reply
#5
(2020-07-19, 19:20)kpr57 Wrote: I use the following code to switch from one video to another from dialovideoinfo.xml

in dialogvideoinfo.xml :
 - in your item :

<onfocus>clearproperty(resumable)</onfocus>
<onclick condition="!integer.isequal(listitem.percentplayed,0)">setproperty(resumable,yes)</onclick>
<onclick>setproperty(action,show_informations)</onclick>
<onclick>action(ContextMenu)</onclick>        


in dialogcontextmenu.xml :

<onload condition="string.isequal(window(movieinformation).property(action),show_informations)">dialog.close(movieinformation,true)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations)">action(down)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations) + string.isequal(window(movieinformation).property(resumable),yes)">action(down)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations)">action(select)</onload>
Thanks for coming back, that was exactly the kind of information I needed (i never would have thought about that kind of change to the context menu).

I managed to get it working by setting it up as follows:

in dialogcontextmenu.xml :

<onload condition="string.isequal(window(movieinformation).property(action),show_informations_tv)">SetFocus(1001)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations_tv)">action(select)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)">SetFocus(1002)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)">action(select)</onload>
 <onunload>ClearProperty(Action,movieinformation)</onunload>

in dialogvideoinfo.xml :

<!-- ===PHIL===-->     
<onclick>SetFocus(8000)</onclick> 
<onclick>SetFocus(5050)</onclick> 
<onclick>SetFocus(352)</onclick>
<onclick condition=String.IsEqual(Container.ListItem.DBTYPE,movie)>setproperty(action,show_informations_movie)</onclick>
<onclick condition=!String.IsEqual(Container.ListItem.DBTYPE,movie)>setproperty(action,show_informations_tv)</onclick>
<onclick>Action(ContextMenu)</onclick> 
<!-- ===PHIL===-->    


Closing the "movieinformation" dialog didnt work for me so im just focusing directly on the appropriate context menu item and then clicking on it.
I may need to include some resumable context, ill need to see what happens for those items.
And ive used setfocus (1001) etc for 1st,2nd,3rd context menu item as I feel this is likely to be more reliable as the menus remember where you were so there is no guarantee that you will always be at the top of the context menu when it opens but the relative positions should always be the same for the same types of items with potentially a resumable option.

Thanks very much.
Reply
#6
So based on yours:

in dialogcontextmenu.xml :

<onload condition="string.isequal(window(movieinformation).property(action),show_informations_tv)">SetFocus(1001)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations_tv)">action(select)</onload>

<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)+ string.isequal(window(movieinformation).property(resumable),yes)">SetFocus(1003)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)+ string.isequal(window(movieinformation).property(resumable),yes)">action(select)</onload>

<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)+ !string.isequal(window(movieinformation).property(resumable),yes)">SetFocus(1002)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)+ !string.isequal(window(movieinformation).property(resumable),yes)">action(select)</onload>
 <onunload>ClearProperty(Action,movieinformation)</onunload>
 <onunload>ClearProperty(resumable,movieinformation)</onunload>

in dialogvideoinfo.xml :

<onclick>SetFocus(8000)</onclick> 
<onclick>SetFocus(5050)</onclick> 
<onclick>SetFocus(352)</onclick>
<onclick condition="Container.ListItem.IsResumable">setproperty(resumable,yes)</onclick>
<onclick condition=String.IsEqual(Container.ListItem.DBTYPE,movie)>setproperty(action,show_informations_movie)</onclick>
<onclick condition=!String.IsEqual(Container.ListItem.DBTYPE,movie)>setproperty(action,show_informations_tv)</onclick>
<onclick>Action(ContextMenu)</onclick> 

I found the "Container.ListItem.IsResumable" more reliable than Percent Played as its returned as an integer but 0% can actually be resumable.

In the context of similar info it only loads TVShows and Movies so im only worried about movies being resumable.

So i can click on a similar item and go to it directly, thanks again for your help.


For any one interested as setup above it currently goes to the items information window and has the similar window active, so greyed out posters until the similar list is loaded. With an additional back in the context menu item onloads this goes to the information window for the item so i'll need to decide which i personally prefer.
Reply
#7
(2020-07-20, 17:56)henryjfry Wrote: So based on yours:

in dialogcontextmenu.xml :

<onload condition="string.isequal(window(movieinformation).property(action),show_informations_tv)">SetFocus(1001)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations_tv)">action(select)</onload>

<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)+ string.isequal(window(movieinformation).property(resumable),yes)">SetFocus(1003)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)+ string.isequal(window(movieinformation).property(resumable),yes)">action(select)</onload>

<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)+ !string.isequal(window(movieinformation).property(resumable),yes)">SetFocus(1002)</onload>
<onload condition="string.isequal(window(movieinformation).property(action),show_informations_movie)+ !string.isequal(window(movieinformation).property(resumable),yes)">action(select)</onload>
 <onunload>ClearProperty(Action,movieinformation)</onunload>
 <onunload>ClearProperty(resumable,movieinformation)</onunload>

in dialogvideoinfo.xml :

<onclick>SetFocus(8000)</onclick> 
<onclick>SetFocus(5050)</onclick> 
<onclick>SetFocus(352)</onclick>
<onclick condition="Container.ListItem.IsResumable">setproperty(resumable,yes)</onclick>
<onclick condition=String.IsEqual(Container.ListItem.DBTYPE,movie)>setproperty(action,show_informations_movie)</onclick>
<onclick condition=!String.IsEqual(Container.ListItem.DBTYPE,movie)>setproperty(action,show_informations_tv)</onclick>
<onclick>Action(ContextMenu)</onclick> 

I found the "Container.ListItem.IsResumable" more reliable than Percent Played as its returned as an integer but 0% can actually be resumable.

In the context of similar info it only loads TVShows and Movies so im only worried about movies being resumable.

So i can click on a similar item and go to it directly, thanks again for your help.


For any one interested as setup above it currently goes to the items information window and has the similar window active, so greyed out posters until the similar list is loaded. With an additional back in the context menu item onloads this goes to the information window for the item so i'll need to decide which i personally prefer.
You're welcome, I had the same problem almost ready. I wanted to display the information of the films of an actor directly from the information window and each time the list of actors disappeared, etc ... I then found this solution to work around the problem. The addition of "listitem.isresumable" is necessary if the movie whose info you want to display is resumable because at that moment in the contextual menu there will be one more line to offer to play or continue the movie and it will therefore be necessary to descend one more line to reach the information button !
Glad I could help you !
Reply

Logout Mark Read Team Forum Stats Members Help
onclick Open the context menu information item for currently selected item?0