Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Running script when launching rom #88637
    jamiem777
    Participant

    That’s great thanks Sselph. I will try this out and let you know how I get on.

    in reply to: Running script when launching rom #88601
    jamiem777
    Participant

    Thanks Sselph, The first post has helped me I was able to run the script and it worked perfectly apart from the gamelist.xml doesnt appear to get updated until after exiting emulation station so it really makes that method of searching rather redundant now. I am now trying to incorporate the details from your second post how would I go about passing the $command into my script. I should be able to work out how to fix it up so that I can get the right details out of it just I haven’t got an idea where to start with this. Here’s my code so far.

    from AndyPi_LCD import AndyPi_LCD
    import lxml.etree as ET
    root = ET.parse("./RetroPie/roms/ports/gamelist.xml")
    lsp = root.findall(".//lastplayed")
    mylist = [t.text for t in lsp]
    newest = max(mylist)
    gname = root.xpath("./game[lastplayed/text()='{}']/name/text()".format(newest))
    print(gname)
    namelcd = "".join(gname)
    print(namelcd)
    lcd=AndyPi_LCD()
    lcd.lcd_init()
    lcd.led(512)
    lcd.static_text(1,"c","Latest Game:")
    lcd.static_text(2,"c",namelcd)
    in reply to: Wondering whats possible. #88089
    jamiem777
    Participant

    Hi Nharka did you have any luck with getting the currently played game to display on your LCD. I am looking to build something similar and I’m trying to work out parsing the xml file on gameslist.xml to get the rom title, I’ve got a few ideas to try when I finish work but if you have managed to succed in this if you wouldnt mind sharing how you did it

    Thanks

    Jamie

Viewing 3 posts - 1 through 3 (of 3 total)