Thread: Obtain "romname" in userfunctions

Results 1 to 4 of 4
  1. Collapse Details
    Obtain "romname" in userfunctions 
    #1
    Junior Member
    MainSecondary
    Join Date
    May 2015
    Posts
    17
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site
    Question
    Is there any way to get romname passed to userfunctions? I am trying to unrar my ps3 games into my rpcs3 game folder. I currently am able to do this by making a userfunction file per rom and hardcoding the paths. I was wondering if there was a way to obtain the romname so I wouldn't have to hardcode paths and make a file per rom. This is an example of what I'm working with right now:

    Code:
    class GlobalEmulatorUserFunction extends UserFunction {
    
    	; Use this function to define any code you want to run on initialization
    	InitUserFeatures() {
    		Global dbName,systemName
    		RLLog.Info(A_ThisFunc . " - Starting")
    		SplitPath, A_ScriptDir,,,,,DRIVE
    		Run, %DRIVE%\Emulation\Utilities\UnRAR.exe x -y "G:\Extra Roms\Sony Playstation 3\%romName%.rar" "%DRIVE%\Emulation\Emulators\RPCS3\dev_hdd0\game",,Hide
    
    }
    %romname% would normally be a hardcoded name in my current method.
     

  2. Collapse Details
    Re: Obtain "romname" in userfunctions 
    #2
    RocketLauncher Developer

    MainSecondary
    Join Date
    Apr 2014
    Posts
    4,791
    You must declare it in the Global line before you can use it, like:
    Global dbName, systemName, romName
     

  3. Collapse Details
    Re: Obtain "romname" in userfunctions 
    #3
    Junior Member
    MainSecondary
    Join Date
    May 2015
    Posts
    17
    Ugh, can't believe I didn't catch that. I just used dbName and works as expected, thank you so much!
     

  4. Collapse Details
    Re: Obtain "romname" in userfunctions 
    #4
    Senior Member
    MainSecondary
    Join Date
    May 2015
    Posts
    311
    Quote Originally Posted by HotBox420 View Post
    Ugh, can't believe I didn't catch that. I just used dbName and works as expected, thank you so much!
    Can you give more details on this or start a new thread detailing how you have this all setup? The current RPCS3 thread has a lot of people trying their own things and it's getting a bit confusing. I'd like to get my PS3 setup going soon. Thank you
     

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •