Yagel Posted September 12, 2008 Posted September 12, 2008 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.
Yagel Posted September 12, 2008 Author Posted September 12, 2008 (edited) 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 September 12, 2008 by Yagel
Yagel Posted September 12, 2008 Author Posted September 12, 2008 (edited) How do i make the InputBox remember what they wrote last time? ( Like saving it on INI file ? ] So they wont need to write the full path everytime clickling on the button... Edited September 12, 2008 by Yagel
Prab Posted September 12, 2008 Posted September 12, 2008 Check out IniRead and IniWrite. Their perfect for this. FolderLog GuiSpeech Assist
Andreik Posted September 12, 2008 Posted September 12, 2008 $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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now