2024-02-27, 04:58
2024-02-27, 05:45
(2024-02-27, 04:58)izprtxqkft Wrote:(2024-02-27, 04:24)activoice Wrote: Is there a command I can add at the end to back out to the previous menu
pretty sure there's nothing fancy about doing this
xbmc.executebuiltin("Back")
or
xbmc.executebuiltin("PreviousMenu")
I tried that already, didn't work, and adding that breaks the script function. It stops a step earlier which is why I came here to ask.
2024-02-27, 05:58
2024-02-28, 04:22
I don't have access to my setup so I can't say if this will work or not.
Technically, the escape key (ESC) is "Previous menu OR Home screen" according to the keyboard controls wiki. I think that it would therefore match more closely with the PreviousMenu Action ID. So maybe try xbmc.executebuiltin('Action(PreviousMenu)') instead.
I don't see how that would work and Back not work, honestly. But there are differences in how the two react, so I would say it's worth a try.
If that doesn't work, post your entire script. Maybe there is an error that someone else can spot. Try to use the Insert Syntax button in the editor (should look like </>)when posting as it will make reading the script easier.
Technically, the escape key (ESC) is "Previous menu OR Home screen" according to the keyboard controls wiki. I think that it would therefore match more closely with the PreviousMenu Action ID. So maybe try xbmc.executebuiltin('Action(PreviousMenu)') instead.
I don't see how that would work and Back not work, honestly. But there are differences in how the two react, so I would say it's worth a try.
If that doesn't work, post your entire script. Maybe there is an error that someone else can spot. Try to use the Insert Syntax button in the editor (should look like </>)when posting as it will make reading the script easier.
2024-02-28, 04:57
Still doesn't work, here is the script that I've got:
So what I'm trying to achieve is
Go to the INFO screen
Click the Refresh Button
Select NO to the question - Locally stored information found. Ignore and refresh from internet
It works up to that point and reloads the information from the NFO, and loads the locally stored Fanart and Poster
Then I want it to simulate ESC or do what ESC does and back out back to the video titles, but can't get it to do that. The final line seems to get ignored.
Script:import xbmc
import time
xbmc.executebuiltin('Action(Info)')
xbmc.executebuiltin('SetFocus(6)')
xbmc.executebuiltin('Action(Select)')
time.sleep(1)
xbmc.executebuiltin('Action(Select)')
xbmc.executebuiltin('Action(PreviousMenu)')
So what I'm trying to achieve is
Go to the INFO screen
Click the Refresh Button
Select NO to the question - Locally stored information found. Ignore and refresh from internet
It works up to that point and reloads the information from the NFO, and loads the locally stored Fanart and Poster
Then I want it to simulate ESC or do what ESC does and back out back to the video titles, but can't get it to do that. The final line seems to get ignored.
2024-03-03, 20:42
You will have to add a sleep command before the Action(Previousmenu) command. It's probably executing that command before Kodi is ready, and thus ignoring it or making it look like it doesn't work. Similar to why I had to put a time.sleep for one second in my original script.
Add a second or two sleep and that might help.
Add a second or two sleep and that might help.
2024-03-08, 21:35