RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Runcommand

    Scheduled Pinned Locked Moved Help and Support
    runcommandquestionshelp
    2 Posts 2 Posters 729 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      Lupin
      last edited by

      runcommand scripts

      "The runcommand menu is what is run every time you play a game, It is what allows you to change emulators, set video resolutions, among other things. One lesser known function is the ability to add customised scripts to be executed on the start and/or on the end of the game.

      The runcommand-onstart.sh script is executed (if exists) before the game starts, and runcommand-onend.sh is executed (if exists) after you exit the emulator. Both files must be at /opt/retropie/configs/all/ directory."

      runcommand scripts "runcommand-onstart.sh" & "runcommand-onend.sh" are listed placed in "all" directory. So we can not run these scripts for specific emulators? e.g. need different scripts for emulators.

      Want to use joy2key.py, omxplayer on onstart.sh and Killall joy2key.py onend.sh, but setting and files for joy2key.py and omxplayer need to change per emulator.
      Seems hard to find examples of runcommand-onstart.sh & runcommand-onend.sh designed to work with multi emulators.

      So will I be need to add many "IF <emulator> = " lines to one script or is there another way?

      mituM 1 Reply Last reply Reply Quote 1
      • mituM
        mitu Global Moderator @Lupin
        last edited by

        @lupin said in Runcommand:

        So will I be need to add many "IF <emulator> = " lines to one script

        Yes, if you need different actions for each emulator.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.