Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Playnite General Dynamic folder paths in scripts tab?

Dynamic folder paths in scripts tab?
steve-o
Offline

#1
12-12-2019, 05:04 PM (This post was last modified: 12-12-2019, 05:06 PM by steve-o.)
Hi,

So I've lately been ripping a lot of my old CD/DVD games to ISO files and setting them up in Playnite.  Overall this has been going really well, and I'm impressed with how simple (relatively speaking) it is to set this up.  In particular, I'm using the scripts tab (pre- and post-game scripts) to mount and unmount the ISO of the game disc, so it will run without me needing to put the actual CD in my actual drive.

This has thus far involved a lot of copy/paste and editing install directory path names to mount the correct ISO (I put the ISO in the game's install dir so it won't get lost.)  Which got me wondering:

I know there's a few macros, like "{InstallDir}" that can be referenced over on the Actions tab, but putting that in my Script tab commands doesn't seem to work like I had hoped.  Is there a way to create macros like that, so that I could just have one mount command that resolves the game's install dir dynamically?

Right now I'm doing a lot of this, for each game:
Mount-Drive -image "<HARDCODED_INSTALL_PATH>\<HARDCODED_FILENAME.ISO>"

But it would be cool if I could do this:
Mount-Drive -image "{InstallDir}\{ImageName}"

Is there a way to do this that I just haven't found yet?
Crow
Online

Administrator
#2
12-12-2019, 05:12 PM
Game variables are currently not being expanded in game scripts. I'll add it in Playnite 7: https://github.com/JosefNemec/Playnite/issues/1589
steve-o
Offline

#3
12-13-2019, 03:49 PM
Sweet!
Every time I think of a feature to request, I find out it either already exists, or it's coming soon. Amazing!
Crow
Online

Administrator
#4
12-13-2019, 04:07 PM
I opened that issue based on this thread, it wouldn't be coming without you mentioning it first Smile
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode