Jump to content

Browse question..


Yagel
 Share

Recommended Posts

Umm, i made a GUI with a button so when you click on it it supposed to start an .EXE file.. ( a game. )

but in every computer its on diffrent Local Dick \ directory and stuff like that.

So my question is.. how can i make the button.. so when you click on it, it opens a Browser.. and ask where's the .EXE file THEN launch it? .

Sorry for my bad english, and thanks from advanced.

Link to comment
Share on other sites

Uhhm, i managed to work it out with an InputBox so it just run's what he wrote.. [ the full patch with the .exe name.. ]

$GameDir = InputBox( "Game Client Patch", "Enter the full path of your Game client ( With the .exe filename)", "", " M", Default, Default, Default, Default)
Switch @error
Case 0
    Switch $GameDir
    Case "a", "b", "c", "d", "e"
        $msg = "Please enter the full path of your Game client."
    Case "QP"
        $msg = "Please enter the full path of your Game client."
    Case "asdf" to "1234"
        $msg = "Please enter the full path of your Game client."
    Case Else
        Run($GameDir)
        EndSwitch
EndSwitch

Thanks :)

Edited by Yagel
Link to comment
Share on other sites

$VALUE = IniReadSection(@ScriptDir & "\MyGameConfig.ini","GAME")
If @error Then
    $GAME = FileOpenDialog("SELECT",@ScriptDir,"Exe (*.exe)",1) 
    If Not @error Then Run('"' & $GAME & '"')
    IniWrite(@ScriptDir & "\MyGameConfig.ini","GAME","PATH",$GAME)
Else 
    Run('"' & $VALUE[1][1] & '"')
EndIf

When the words fail... music speaks.

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...