Jump to content

IniRead Var in Run()


Recommended Posts

So I'm writing a launcher for a video game and I'm trying to make my launcher read certain variables from a .ini file which is fine, I've done it before but never in Run()

The script isn't even executing the .exe so I'm guessing its failing at the iniread section or the Run() section.

Here's a test script I wrote to demonstrate what I'm talking about. ( Because the actual launcher script is annoying and has a patching system / status check that would be annoying to sort through )

#include <GUIConstants.au3>
#include <File.au3>

GUICreate ( "Launcher", 600, 480,(@DesktopWidth-600)/2, (@DesktopHeight-480)/2 )
Opt("GUIOnEventMode", 1)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")

$Launch = GUICtrlCreateButton("Start Game", 5, 420, 100, 33, 0)
$Fcon = @ScriptDir & "\FConfig.ini"
$con = IniRead("FConfig.ini", "SERVER", "SIP", "NotFound")

GuiSetState()

While 1
    $msg = GuiGetMsg()
    
    Select
        
    Case $msg = $Launch
        Run('TRose.exe @TRIGGER_SOFT@ _server' & $con)
        Winclose("Launcher")
    EndSelect
    
WEnd

Func _Quit()
    Exit
EndFunc

If anyone could point out where its not working ( I'm thinking its failing in Run() ) or point me in the right direction I would be very grateful.

I've tried it several different ways but it doesn't want to work.

Thanks

--Portwolf

Edited by Portwolf
Link to comment
Share on other sites

RUN works in one directory.. try changin it.. or specifying the workingdir to the folder its located in

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...